std::string TizenWebEngineBackForwardListItem::GetUrl() const
{
- return std::string(ewk_back_forward_list_item_url_get(mEwkBackForwardListItem));
+ const char* url = ewk_back_forward_list_item_url_get(mEwkBackForwardListItem);
+ return url ? std::string(url) : std::string();
}
std::string TizenWebEngineBackForwardListItem::GetTitle() const
{
- return std::string(ewk_back_forward_list_item_title_get(mEwkBackForwardListItem));
+ const char* title = ewk_back_forward_list_item_title_get(mEwkBackForwardListItem);
+ return title ? std::string(title) : std::string();
}
std::string TizenWebEngineBackForwardListItem::GetOriginalUrl() const
{
- return std::string(ewk_back_forward_list_item_original_url_get(mEwkBackForwardListItem));
+ const char* url = ewk_back_forward_list_item_original_url_get(mEwkBackForwardListItem);
+ return url ? std::string(url) : std::string();
}
} // namespace Plugin
namespace Plugin
{
-namespace
-{
-const std::string EMPTY_STRING;
-} // namespace
-
TizenWebEngineCertificate::TizenWebEngineCertificate(Ewk_Certificate_Policy_Decision* decision)
: ewkCertificatePolicyDecision(decision)
, ewkCertificateInfo(0)
std::string TizenWebEngineCertificate::GetPem() const
{
- return ewkCertificateInfo ? std::string(ewk_certificate_info_pem_get(ewkCertificateInfo)) : EMPTY_STRING;
+ const char* pem = nullptr;
+ if (ewkCertificateInfo)
+ {
+ pem = ewk_certificate_info_pem_get(ewkCertificateInfo);
+ }
+ return pem ? std::string(pem) : std::string();
}
bool TizenWebEngineCertificate::IsContextSecure() const
namespace Plugin
{
-namespace
-{
-// const
-const std::string EMPTY_STRING;
-} // namespace
-
class WebViewContainerClientPair
{
public:
, mClient(client)
, mWidth(width)
, mHeight(height)
- , mUserAgent()
, mWebEngineSettings(0)
, mWebEngineContext(0)
, mWebEngineCookieManager(0)
, mClient(client)
, mWidth(width)
, mHeight(height)
- , mUserAgent()
, mWebEngineSettings(0)
, mWebEngineContext(0)
, mWebEngineCookieManager(0)
evas_object_smart_callback_add(mWebView, "ssl,certificate,changed",
&WebViewContainerForDali::OnSslCertificateChanged,
&mClient);
- evas_object_smart_callback_add(mWebView, "contextmenu,customize",
- &WebViewContainerForDali::OnContextMenuCustomized,
+ evas_object_smart_callback_add(mWebView, "contextmenu,show",
+ &WebViewContainerForDali::OnContextMenuShown,
&mClient);
- evas_object_smart_callback_add(mWebView, "contextmenu,selected",
- &WebViewContainerForDali::OnContextMenuItemSelected,
+ evas_object_smart_callback_add(mWebView, "contextmenu,hide",
+ &WebViewContainerForDali::OnContextMenuHidden,
&mClient);
ewk_view_authentication_callback_set(mWebView, &WebViewContainerForDali::OnAuthenticationChallenge, &mClient);
std::string GetUrl()
{
- return std::string(ewk_view_url_get(mWebView));
+ const char* url = ewk_view_url_get(mWebView);
+ return url ? std::string(url) : std::string();
}
bool LoadHtmlStringOverrideCurrentEntry(const std::string& html, const std::string& basicUri,
std::string GetTitle()
{
- return std::string(ewk_view_title_get(mWebView));
+ const char* title = ewk_view_title_get(mWebView);
+ return title ? std::string(title) : std::string();
}
Dali::PixelData GetFavicon()
ewk_view_clear_all_tiles_resources(mWebView);
}
- const std::string& GetUserAgent()
+ std::string GetUserAgent()
{
- mUserAgent = std::string(ewk_view_user_agent_get(mWebView));
- return mUserAgent;
+ const char* agent = ewk_view_user_agent_get(mWebView);
+ return agent ? std::string(agent) : std::string();
}
void SetUserAgent(const std::string& userAgent)
std::string GetSelectedText() const
{
- return ewk_view_text_selection_text_get(mWebView);
+ const char* text = ewk_view_text_selection_text_get(mWebView);
+ return text ? std::string(text) : std::string();
}
bool SendTouchEvent(const TouchEvent& touch)
client->AuthenticationChallenge(std::move(authHandler));
}
- static void OnContextMenuCustomized(void* data, Evas_Object*, void* eventInfo)
+ static void OnContextMenuShown(void* data, Evas_Object*, void* eventInfo)
{
- auto client = static_cast<WebViewContainerClient *>(data);
- Ewk_Context_Menu* menu = (Ewk_Context_Menu *)eventInfo;
+ auto client = static_cast<WebViewContainerClient*>(data);
+ Ewk_Context_Menu* menu = (Ewk_Context_Menu*)eventInfo;
std::shared_ptr<Dali::WebEngineContextMenu> contextMenu(new TizenWebEngineContextMenu(menu));
- client->ContextMenuCustomized(std::move(contextMenu));
+ client->ContextMenuShown(std::move(contextMenu));
}
- static void OnContextMenuItemSelected(void* data, Evas_Object*, void* eventInfo)
+ static void OnContextMenuHidden(void* data, Evas_Object*, void* eventInfo)
{
auto client = static_cast<WebViewContainerClient*>(data);
- Ewk_Context_Menu_Item* item = (Ewk_Context_Menu_Item*)eventInfo;
- std::shared_ptr<Dali::WebEngineContextMenuItem> contextMenuItem(new TizenWebEngineContextMenuItem(item));
- client->ContextMenuItemSelected(std::move(contextMenuItem));
+ Ewk_Context_Menu* menu = (Ewk_Context_Menu*)eventInfo;
+ std::shared_ptr<Dali::WebEngineContextMenu> contextMenu(new TizenWebEngineContextMenu(menu));
+ client->ContextMenuHidden(std::move(contextMenu));
}
static void OnEvaluateJavaScript(Evas_Object* o, const char* result, void* data)
uint32_t mWidth;
uint32_t mHeight;
- std::string mUserAgent;
TizenWebEngineSettings mWebEngineSettings;
TizenWebEngineContext mWebEngineContext;
std::string TizenWebEngineChromium::GetTitle() const
{
- return mWebViewContainer ? mWebViewContainer->GetTitle() : EMPTY_STRING;
+ return mWebViewContainer ? mWebViewContainer->GetTitle() : std::string();
}
Dali::PixelData TizenWebEngineChromium::GetFavicon() const
return mDaliImageSrc;
}
-const std::string& TizenWebEngineChromium::GetUrl()
+std::string TizenWebEngineChromium::GetUrl() const
{
- if (mWebViewContainer)
- {
- mUrl = mWebViewContainer->GetUrl();
- }
- return mUrl;
+ return mWebViewContainer ? mWebViewContainer->GetUrl() : std::string();
}
void TizenWebEngineChromium::LoadHtmlString(const std::string& html)
}
}
-const std::string& TizenWebEngineChromium::GetUserAgent() const
+std::string TizenWebEngineChromium::GetUserAgent() const
{
- if (mWebViewContainer)
- {
- return mWebViewContainer->GetUserAgent();
- }
- return EMPTY_STRING;
+ return mWebViewContainer ? mWebViewContainer->GetUserAgent() : std::string();
}
void TizenWebEngineChromium::SetUserAgent(const std::string& userAgent)
std::string TizenWebEngineChromium::GetSelectedText() const
{
- if(mWebViewContainer)
- {
- return mWebViewContainer->GetSelectedText();
- }
- return EMPTY_STRING;
+ return mWebViewContainer? mWebViewContainer->GetSelectedText() : std::string();
}
bool TizenWebEngineChromium::SendTouchEvent(const Dali::TouchEvent& touch)
return mHttpAuthHandlerSignal;
}
-Dali::WebEnginePlugin::WebEngineContextMenuCustomizedSignalType& TizenWebEngineChromium::ContextMenuCustomizedSignal()
+Dali::WebEnginePlugin::WebEngineContextMenuShownSignalType& TizenWebEngineChromium::ContextMenuShownSignal()
{
- return mContextMenuCustomizedSignal;
+ return mContextMenuShownSignal;
}
-Dali::WebEnginePlugin::WebEngineContextMenuItemSelectedSignalType& TizenWebEngineChromium::ContextMenuItemSelectedSignal()
+Dali::WebEnginePlugin::WebEngineContextMenuHiddenSignalType& TizenWebEngineChromium::ContextMenuHiddenSignal()
{
- return mContextMenuItemSelectedSignal;
+ return mContextMenuHiddenSignal;
}
// WebViewContainerClient Interface
}
}
-void TizenWebEngineChromium::ContextMenuCustomized(std::shared_ptr<Dali::WebEngineContextMenu> menu)
+void TizenWebEngineChromium::ContextMenuShown(std::shared_ptr<Dali::WebEngineContextMenu> menu)
{
- DALI_LOG_RELEASE_INFO("#ContextMenuCustomized.\n");
- if (!mContextMenuCustomizedSignal.Empty())
+ DALI_LOG_RELEASE_INFO("#ContextMenuShown.\n");
+ if (!mContextMenuShownSignal.Empty())
{
- mContextMenuCustomizedSignal.Emit(std::move(menu));
+ mContextMenuShownSignal.Emit(std::move(menu));
}
}
-void TizenWebEngineChromium::ContextMenuItemSelected(std::shared_ptr<Dali::WebEngineContextMenuItem> item)
+void TizenWebEngineChromium::ContextMenuHidden(std::shared_ptr<Dali::WebEngineContextMenu> menu)
{
- DALI_LOG_RELEASE_INFO("#ContextMenuItemSelected.\n");
- if (!mContextMenuItemSelectedSignal.Empty())
+ DALI_LOG_RELEASE_INFO("#ContextMenuHidden.\n");
+ if (!mContextMenuHiddenSignal.Empty())
{
- mContextMenuItemSelectedSignal.Emit(std::move(item));
+ mContextMenuHiddenSignal.Emit(std::move(menu));
}
}
void TizenWebEngineChromium::ScreenshotCaptured(Dali::PixelData pixelData)
{
+ DALI_LOG_RELEASE_INFO("#ScreenshotCaptured.\n");
if (mScreenshotCapturedCallback)
{
mScreenshotCapturedCallback(pixelData);
/**
* @brief Callback function to be called by WebViewContainer when context menu
- * would be customized.
- * @param [in] url New url after url is changed.
+ * would be shown.
+ * @param [in] menu Menu would be shown.
*/
- virtual void ContextMenuCustomized(std::shared_ptr<Dali::WebEngineContextMenu> menu) = 0;
+ virtual void ContextMenuShown(std::shared_ptr<Dali::WebEngineContextMenu> menu) = 0;
/**
* @brief Callback function to be called by WebViewContainer when context menu
- * item is selected.
- * @param [in] url New url after url is changed.
+ * would be hidden.
+ * @param [in] menu Menu would be hidden.
*/
- virtual void ContextMenuItemSelected(std::shared_ptr<Dali::WebEngineContextMenuItem> item) = 0;
+ virtual void ContextMenuHidden(std::shared_ptr<Dali::WebEngineContextMenu> menu) = 0;
/**
* @brief Callback function to be called by WebViewContainer when it gets
/**
* @copydoc Dali::WebEnginePlugin::GetUrl()
*/
- const std::string& GetUrl() override;
+ std::string GetUrl() const override;
/**
* @copydoc Dali::WebEnginePlugin::LoadHtmlString()
/**
* @copydoc Dali::WebEnginePlugin::GetUserAgent()
*/
- const std::string& GetUserAgent() const override;
+ std::string GetUserAgent() const override;
/**
* @copydoc Dali::WebEnginePlugin::SetUserAgent()
Dali::WebEnginePlugin::WebEngineHttpAuthHandlerSignalType& HttpAuthHandlerSignal() override;
/**
- * @copydoc Dali::WebEnginePlugin::ContextMenuCustomizedSignal()
+ * @copydoc Dali::WebEnginePlugin::ContextMenuShownSignal()
*/
- Dali::WebEnginePlugin::WebEngineContextMenuCustomizedSignalType& ContextMenuCustomizedSignal() override;
+ Dali::WebEnginePlugin::WebEngineContextMenuShownSignalType& ContextMenuShownSignal() override;
/**
- * @copydoc Dali::WebEnginePlugin::ContextMenuItemSelectedSignal()
+ * @copydoc Dali::WebEnginePlugin::ContextMenuHiddenSignal()
*/
- Dali::WebEnginePlugin::WebEngineContextMenuItemSelectedSignalType& ContextMenuItemSelectedSignal() override;
+ Dali::WebEnginePlugin::WebEngineContextMenuHiddenSignalType& ContextMenuHiddenSignal() override;
// WebViewContainerClient Interface
void AuthenticationChallenge(std::shared_ptr<Dali::WebEngineHttpAuthHandler> handler) override;
/**
- * @copydoc Dali::Plugin::WebViewContainerClient::ContextMenuCustomized()
+ * @copydoc Dali::Plugin::WebViewContainerClient::ContextMenuShown()
*/
- void ContextMenuCustomized(std::shared_ptr<Dali::WebEngineContextMenu> menu) override;
+ void ContextMenuShown(std::shared_ptr<Dali::WebEngineContextMenu> menu) override;
/**
- * @copydoc Dali::Plugin::WebViewContainerClient::ContextMenuItemSelected()
+ * @copydoc Dali::Plugin::WebViewContainerClient::ContextMenuHidden()
*/
- void ContextMenuItemSelected(std::shared_ptr<Dali::WebEngineContextMenuItem> item) override;
+ void ContextMenuHidden(std::shared_ptr<Dali::WebEngineContextMenu> menu) override;
/**
* @copydoc
private:
WebViewContainerForDali* mWebViewContainer;
Dali::NativeImageSourcePtr mDaliImageSrc;
- std::string mUrl;
size_t mJavaScriptEvaluationCount;
- Dali::WebEnginePlugin::WebEnginePageLoadSignalType mLoadStartedSignal;
- Dali::WebEnginePlugin::WebEnginePageLoadSignalType mLoadInProgressSignal;
- Dali::WebEnginePlugin::WebEnginePageLoadSignalType mLoadFinishedSignal;
- Dali::WebEnginePlugin::WebEnginePageLoadErrorSignalType mLoadErrorSignal;
- Dali::WebEnginePlugin::WebEngineUrlChangedSignalType mUrlChangedSignal;
- Dali::WebEnginePlugin::WebEngineScrollEdgeReachedSignalType mScrollEdgeReachedSignal;
- Dali::WebEnginePlugin::WebEngineFormRepostDecisionSignalType mFormRepostDecisionSignal;
- Dali::WebEnginePlugin::WebEngineFrameRenderedSignalType mFrameRenderedSignal;
- Dali::WebEnginePlugin::WebEngineRequestInterceptorSignalType mRequestInterceptorSignal;
- Dali::WebEnginePlugin::WebEngineConsoleMessageSignalType mConsoleMessageSignal;
- Dali::WebEnginePlugin::WebEngineResponsePolicyDecisionSignalType mResponsePolicyDecisionSignal;
- Dali::WebEnginePlugin::WebEngineCertificateSignalType mCertificateConfirmSignal;
- Dali::WebEnginePlugin::WebEngineCertificateSignalType mSslCertificateChangedSignal;
- Dali::WebEnginePlugin::WebEngineHttpAuthHandlerSignalType mHttpAuthHandlerSignal;
- Dali::WebEnginePlugin::WebEngineContextMenuCustomizedSignalType mContextMenuCustomizedSignal;
- Dali::WebEnginePlugin::WebEngineContextMenuItemSelectedSignalType mContextMenuItemSelectedSignal;
+ Dali::WebEnginePlugin::WebEnginePageLoadSignalType mLoadStartedSignal;
+ Dali::WebEnginePlugin::WebEnginePageLoadSignalType mLoadInProgressSignal;
+ Dali::WebEnginePlugin::WebEnginePageLoadSignalType mLoadFinishedSignal;
+ Dali::WebEnginePlugin::WebEnginePageLoadErrorSignalType mLoadErrorSignal;
+ Dali::WebEnginePlugin::WebEngineUrlChangedSignalType mUrlChangedSignal;
+ Dali::WebEnginePlugin::WebEngineScrollEdgeReachedSignalType mScrollEdgeReachedSignal;
+ Dali::WebEnginePlugin::WebEngineFormRepostDecisionSignalType mFormRepostDecisionSignal;
+ Dali::WebEnginePlugin::WebEngineFrameRenderedSignalType mFrameRenderedSignal;
+ Dali::WebEnginePlugin::WebEngineRequestInterceptorSignalType mRequestInterceptorSignal;
+ Dali::WebEnginePlugin::WebEngineConsoleMessageSignalType mConsoleMessageSignal;
+ Dali::WebEnginePlugin::WebEngineResponsePolicyDecisionSignalType mResponsePolicyDecisionSignal;
+ Dali::WebEnginePlugin::WebEngineCertificateSignalType mCertificateConfirmSignal;
+ Dali::WebEnginePlugin::WebEngineCertificateSignalType mSslCertificateChangedSignal;
+ Dali::WebEnginePlugin::WebEngineHttpAuthHandlerSignalType mHttpAuthHandlerSignal;
+ Dali::WebEnginePlugin::WebEngineContextMenuShownSignalType mContextMenuShownSignal;
+ Dali::WebEnginePlugin::WebEngineContextMenuHiddenSignalType mContextMenuHiddenSignal;
std::unordered_map<size_t, JavaScriptCallback> mJavaScriptEvaluationResultHandlers;
std::unordered_map<std::string, JavaScriptCallback> mJavaScriptMessageHandlers;
std::string TizenWebEngineConsoleMessage::GetSource() const
{
- return std::string(ewk_console_message_source_get(ewkConsoleMessage));
+ const char* source = ewk_console_message_source_get(ewkConsoleMessage);
+ return source ? std::string(source) : std::string();
}
uint32_t TizenWebEngineConsoleMessage::GetLine() const
std::string TizenWebEngineConsoleMessage::GetText() const
{
- return std::string(ewk_console_message_text_get(ewkConsoleMessage));
+ const char* text = ewk_console_message_text_get(ewkConsoleMessage);
+ return text ? std::string(text) : std::string();
}
} // namespace Plugin
std::string TizenWebEngineContextMenuItem::GetLinkUrl() const
{
- return ewk_context_menu_item_link_url_get(ewkContextMenuItem);
+ const char* url = ewk_context_menu_item_link_url_get(ewkContextMenuItem);
+ return url ? std::string(url) : std::string();
}
std::string TizenWebEngineContextMenuItem::GetImageUrl() const
{
- return ewk_context_menu_item_image_url_get(ewkContextMenuItem);
+ const char* url = ewk_context_menu_item_image_url_get(ewkContextMenuItem);
+ return url ? std::string(url) : std::string();
}
std::string TizenWebEngineContextMenuItem::GetTitle() const
{
- return ewk_context_menu_item_title_get(ewkContextMenuItem);
+ const char* title = ewk_context_menu_item_title_get(ewkContextMenuItem);
+ return title ? std::string(title) : std::string();
}
std::unique_ptr<Dali::WebEngineContextMenu> TizenWebEngineContextMenuItem::GetParentMenu() const
return ewk_context_menu_item_select(ewkContextMenu, menuItem->GetMenuItem());
}
-Dali::Vector2 TizenWebEngineContextMenu::GetPosition() const
-{
- int x = 0, y = 0;
-#if defined(OS_TIZEN_TV)
- x = ewk_context_menu_pos_x_get(ewkContextMenu);
- y = ewk_context_menu_pos_y_get(ewkContextMenu);
-#endif
- return Dali::Vector2(x, y);
-}
-
bool TizenWebEngineContextMenu::Hide()
{
return ewk_context_menu_hide(ewkContextMenu);
std::vector<std::unique_ptr<Dali::WebEngineContextMenuItem>> GetItemList() const override;
/**
- * @copydoc Dali::WebEngineContextMenu::GetPosition()
- */
- Dali::Vector2 GetPosition() const override;
-
- /**
* @copydoc Dali::WebEngineContextMenu::RemoveItem()
*/
bool RemoveItem(Dali::WebEngineContextMenuItem& item) override;
ewk_context_proxy_uri_set(ewkContext, uri.c_str());
}
-std::string TizenWebEngineContext::GetContextProxy() const
+std::string TizenWebEngineContext::GetProxyUri() const
{
- return ewk_context_proxy_uri_get(ewkContext);
+ const char* uri = ewk_context_proxy_uri_get(ewkContext);
+ return uri ? std::string(uri) : std::string();
+}
+
+void TizenWebEngineContext::SetProxyBypassRule(const std::string& proxy, const std::string& bypass)
+{
+ ewk_context_proxy_set(ewkContext, proxy.c_str(), bypass.c_str());
+}
+
+std::string TizenWebEngineContext::GetProxyBypassRule() const
+{
+ const char* rule = ewk_context_proxy_bypass_rule_get(ewkContext);
+ return rule ? std::string(rule) : std::string();
}
void TizenWebEngineContext::SetDefaultProxyAuth(const std::string& username, const std::string& password)
ewk_context_certificate_file_set(ewkContext, certificatePath.c_str());
}
+std::string TizenWebEngineContext::GetCertificateFilePath() const
+{
+ const char* path = ewk_context_certificate_file_get(ewkContext);
+ return path ? std::string(path) : std::string();
+}
+
void TizenWebEngineContext::DeleteAllWebDatabase()
{
ewk_context_web_database_delete_all(ewkContext);
return !ewk_context_cache_disabled_get(ewkContext);
}
-std::string TizenWebEngineContext::GetContextCertificateFile() const
+void TizenWebEngineContext::SetAppId(const std::string& appId)
{
- return ewk_context_certificate_file_get(ewkContext);
+ ewk_context_tizen_app_id_set(ewkContext, appId.c_str());
}
-void TizenWebEngineContext::SetContextAppId(const std::string& appID)
-{
- ewk_context_tizen_app_id_set(ewkContext, appID.c_str());
-}
-
-bool TizenWebEngineContext::SetContextAppVersion(const std::string& appVersion)
+bool TizenWebEngineContext::SetAppVersion(const std::string& appVersion)
{
return ewk_context_tizen_app_version_set(ewkContext, appVersion.c_str());
}
-void TizenWebEngineContext::SetContextApplicationType(const ApplicationType applicationType)
+void TizenWebEngineContext::SetApplicationType(const ApplicationType applicationType)
{
ewk_context_application_type_set(ewkContext, static_cast<Ewk_Application_Type>(applicationType));
}
-void TizenWebEngineContext::SetContextTimeOffset(float timeOffset)
+void TizenWebEngineContext::SetTimeOffset(float timeOffset)
{
ewk_context_time_offset_set(ewkContext, double(timeOffset));
}
-void TizenWebEngineContext::SetContextTimeZoneOffset(float timeZoneOffset, float daylightSavingTime)
+void TizenWebEngineContext::SetTimeZoneOffset(float timeZoneOffset, float daylightSavingTime)
{
ewk_context_timezone_offset_set(ewkContext, double(timeZoneOffset), double(daylightSavingTime));
}
+void TizenWebEngineContext::SetDefaultZoomFactor(float zoomFactor)
+{
+ ewk_context_default_zoom_factor_set(ewkContext, double(zoomFactor));
+}
+
+float TizenWebEngineContext::GetDefaultZoomFactor() const
+{
+ return (float)ewk_context_default_zoom_factor_get(ewkContext);
+}
+
void TizenWebEngineContext::RegisterUrlSchemesAsCorsEnabled(const std::vector<std::string>& schemes)
{
Eina_List* list = nullptr;
ewk_context_register_jsplugin_mime_types(ewkContext, list);
}
-void TizenWebEngineContext::SetDefaultZoomFactor(float zoomFactor)
-{
- ewk_context_default_zoom_factor_set(ewkContext, double(zoomFactor));
-}
-
-float TizenWebEngineContext::GetContextDefaultZoomFactor() const
-{
- return (float)ewk_context_default_zoom_factor_get(ewkContext);
-}
-
bool TizenWebEngineContext::DeleteAllApplicationCache()
{
return ewk_context_application_cache_delete_all(ewkContext);
ewk_context_form_candidate_data_delete_all(ewkContext);
}
-void TizenWebEngineContext::SetContextProxy(const std::string& proxy, const std::string& bypass)
-{
- ewk_context_proxy_set(ewkContext, proxy.c_str(), bypass.c_str());
-}
-
-std::string TizenWebEngineContext::GetProxyBypassRule() const
-{
- return ewk_context_proxy_bypass_rule_get(ewkContext);
-}
-
bool TizenWebEngineContext::FreeUnusedMemory()
{
return ewk_context_notify_low_memory(ewkContext);
void SetProxyUri(const std::string& uri) override;
/**
+ * @copydoc Dali::WebEngineContext::GetProxyUri()
+ */
+ std::string GetProxyUri() const override;
+
+ /**
+ * @copydoc Dali::WebEngineContext::SetProxyBypassRule()
+ */
+ void SetProxyBypassRule(const std::string& proxy, const std::string& bypass) override;
+
+ /**
+ * @copydoc Dali::WebEngineContext::GetProxyBypassRule()
+ */
+ std::string GetProxyBypassRule() const override;
+
+ /**
* @copydoc Dali::WebEngineContext::SetDefaultProxyAuth()
*/
void SetDefaultProxyAuth(const std::string& username, const std::string& password) override;
void SetCertificateFilePath(const std::string& certificatePath) override;
/**
+ * @copydoc Dali::WebEngineContext::GetCertificateFilePath()
+ */
+ std::string GetCertificateFilePath() const override;
+
+ /**
* @copydoc Dali::WebEngineContext::DeleteAllWebDatabase()
*/
void DeleteAllWebDatabase() override;
bool IsCacheEnabled() const override;
/**
- * @copydoc Dali::WebEngineContext::GetContextCertificateFile()
+ * @copydoc Dali::WebEngineContext::SetAppId()
+ */
+ void SetAppId(const std::string& appID) override;
+
+ /**
+ * @copydoc Dali::WebEngineContext::SetAppVersion()
*/
- std::string GetContextCertificateFile() const override;
+ bool SetAppVersion(const std::string& appVersion) override;
/**
- * @copydoc Dali::WebEngineContext::SetContextAppId()
+ * @copydoc Dali::WebEngineContext::SetApplicationType()
*/
- void SetContextAppId(const std::string& appID) override;
+ void SetApplicationType(const ApplicationType applicationType) override;
/**
- * @copydoc Dali::WebEngineContext::SetContextAppVersion()
+ * @copydoc Dali::WebEngineContext::SetTimeOffset()
*/
- bool SetContextAppVersion(const std::string& appVersion) override;
+ void SetTimeOffset(float timeOffset) override;
/**
- * @copydoc Dali::WebEngineContext::SetContextApplicationType()
+ * @copydoc Dali::WebEngineContext::SetTimeZoneOffset()
*/
- void SetContextApplicationType(const ApplicationType applicationType) override;
+ void SetTimeZoneOffset(float timeZoneOffset, float daylightSavingTime) override;
/**
- * @copydoc Dali::WebEngineContext::SetContextTimeOffset()
+ * @copydoc Dali::WebEngineContext::SetDefaultZoomFactor()
*/
- void SetContextTimeOffset(float timeOffset) override;
+ void SetDefaultZoomFactor(float zoomFactor) override;
/**
- * @copydoc Dali::WebEngineContext::SetContextTimeZoneOffset()
+ * @copydoc Dali::WebEngineContext::GetDefaultZoomFactor()
*/
- void SetContextTimeZoneOffset(float timeZoneOffset, float daylightSavingTime) override;
+ float GetDefaultZoomFactor() const override;
/**
* @copydoc Dali::WebEngineContext::RegisterUrlSchemesAsCorsEnabled()
void RegisterJsPluginMimeTypes(const std::vector<std::string>& mimeTypes)override;
/**
- * @copydoc Dali::WebEngineContext::SetDefaultZoomFactor()
- */
- void SetDefaultZoomFactor(float zoomFactor) override;
-
- /**
- * @copydoc Dali::WebEngineContext::GetContextDefaultZoomFactor()
- */
- float GetContextDefaultZoomFactor() const override;
-
- /**
* @copydoc Dali::WebEngineContext::DeleteAllApplicationCache()
*/
bool DeleteAllApplicationCache() override;
/**
* @copydoc Dali::WebEngineContext::DeleteAllFormPasswordData()
*/
-
void DeleteAllFormPasswordData() override;
/**
* @copydoc Dali::WebEngineContext::DeleteAllFormCandidateData()
*/
-
void DeleteAllFormCandidateData() override;
/**
- * @copydoc Dali::WebEngineContext::GetContextProxy()
- */
- std::string GetContextProxy() const override;
-
- /**
- * @copydoc Dali::WebEngineContext::SetContextProxy()
- */
- void SetContextProxy(const std::string& proxy, const std::string& bypass) override;
-
- /**
- * @copydoc Dali::WebEngineContext::GetProxyBypassRule()
- */
- std::string GetProxyBypassRule() const override;
-
- /**
* @copydoc Dali::WebEngineContext::FreeUnusedMemory()
*/
bool FreeUnusedMemory() override;
std::string TizenWebEngineHitTest::GetLinkUri() const
{
- return std::string(ewk_hit_test_link_uri_get(ewkHitTest));
+ const char* uri = ewk_hit_test_link_uri_get(ewkHitTest);
+ return uri ? std::string(uri) : std::string();
}
std::string TizenWebEngineHitTest::GetLinkTitle() const
{
- return std::string(ewk_hit_test_link_title_get(ewkHitTest));
+ const char* title = ewk_hit_test_link_title_get(ewkHitTest);
+ return title ? std::string(title) : std::string();
}
std::string TizenWebEngineHitTest::GetLinkLabel() const
{
- return std::string(ewk_hit_test_link_label_get(ewkHitTest));
+ const char* label = ewk_hit_test_link_label_get(ewkHitTest);
+ return label ? std::string(label) : std::string();
}
std::string TizenWebEngineHitTest::GetImageUri() const
{
- return std::string(ewk_hit_test_image_uri_get(ewkHitTest));
+ const char* uri = ewk_hit_test_image_uri_get(ewkHitTest);
+ return uri ? std::string(uri) : std::string();
}
std::string TizenWebEngineHitTest::GetMediaUri() const
{
- return std::string(ewk_hit_test_media_uri_get(ewkHitTest));
+ const char* uri = ewk_hit_test_media_uri_get(ewkHitTest);
+ return uri ? std::string(uri) : std::string();
}
std::string TizenWebEngineHitTest::GetTagName() const
{
- return std::string(ewk_hit_test_tag_name_get(ewkHitTest));
+ const char* name = ewk_hit_test_tag_name_get(ewkHitTest);
+ return name ? std::string(name) : std::string();
}
std::string TizenWebEngineHitTest::GetNodeValue() const
{
- return std::string(ewk_hit_test_node_value_get(ewkHitTest));
+ const char* value = ewk_hit_test_node_value_get(ewkHitTest);
+ return value ? std::string(value) : std::string();
}
Dali::Property::Map& TizenWebEngineHitTest::GetAttributes() const
std::string TizenWebEngineHitTest::GetImageFileNameExtension() const
{
- return std::string(ewk_hit_test_image_file_name_extension_get(ewkHitTest));
+ const char* extension = ewk_hit_test_image_file_name_extension_get(ewkHitTest);
+ return extension ? std::string(extension) : std::string();
}
Dali::PixelData TizenWebEngineHitTest::GetImageBuffer()
std::string TizenWebEngineHttpAuthHandler::GetRealm() const
{
- return std::string(ewk_auth_challenge_realm_get(ewkAuthChallenge));
+ const char* realm = ewk_auth_challenge_realm_get(ewkAuthChallenge);
+ return realm ? std::string(realm) : std::string();
}
void TizenWebEngineHttpAuthHandler::Suspend()
std::string TizenWebEngineLoadError::GetUrl() const
{
- return std::string(ewk_error_url_get(ewkError));
+ const char* url = ewk_error_url_get(ewkError);
+ return url ? std::string(url) : std::string();
}
Dali::WebEngineLoadError::ErrorCode TizenWebEngineLoadError::GetCode() const
std::string TizenWebEngineLoadError::GetDescription() const
{
- return std::string(ewk_error_description_get(ewkError));
+ const char* description = ewk_error_description_get(ewkError);
+ return description ? std::string(description) : std::string();
}
Dali::WebEngineLoadError::ErrorType TizenWebEngineLoadError::GetType() const
std::string TizenWebEnginePolicyDecision::GetUrl() const
{
- return ewk_policy_decision_url_get(ewkPolicyDecision);
+ const char* url = ewk_policy_decision_url_get(ewkPolicyDecision);
+ return url ? std::string(url) : std::string();
}
std::string TizenWebEnginePolicyDecision::GetCookie() const
{
- return ewk_policy_decision_cookie_get(ewkPolicyDecision);
+ const char* cookie = ewk_policy_decision_cookie_get(ewkPolicyDecision);
+ return cookie ? std::string(cookie) : std::string();
}
Dali::WebEnginePolicyDecision::DecisionType TizenWebEnginePolicyDecision::GetDecisionType() const
std::string TizenWebEnginePolicyDecision::GetResponseMime() const
{
- return ewk_policy_decision_response_mime_get(ewkPolicyDecision);
+ const char* mime = ewk_policy_decision_response_mime_get(ewkPolicyDecision);
+ return mime ? std::string(mime) : std::string();
}
int32_t TizenWebEnginePolicyDecision::GetResponseStatusCode() const
std::string TizenWebEnginePolicyDecision::GetScheme() const
{
- return std::string(ewk_policy_decision_scheme_get(ewkPolicyDecision));
+ const char* scheme = ewk_policy_decision_scheme_get(ewkPolicyDecision);
+ return scheme ? std::string(scheme) : std::string();
}
bool TizenWebEnginePolicyDecision::Use()
std::string TizenWebEngineRequestInterceptor::GetUrl() const
{
- return std::string(ewk_intercept_request_url_get(ewkRequestInterceptor));
+ const char* url = ewk_intercept_request_url_get(ewkRequestInterceptor);
+ return url ? std::string(url) : std::string();
}
bool TizenWebEngineRequestInterceptor::Ignore()
std::string TizenWebEngineSecurityOrigin::GetHost() const
{
- return ewk_security_origin_host_get(ewkSecurityOrigin);
+ const char* host = ewk_security_origin_host_get(ewkSecurityOrigin);
+ return host ? std::string(host) : std::string();
}
std::string TizenWebEngineSecurityOrigin::GetProtocol() const
{
- return ewk_security_origin_protocol_get(ewkSecurityOrigin);
+ const char* protocol = ewk_security_origin_protocol_get(ewkSecurityOrigin);
+ return protocol ? std::string(protocol) : std::string();
}
Ewk_Security_Origin* TizenWebEngineSecurityOrigin::GetSecurityOrigin() const
std::string TizenWebEngineSettings::GetDefaultTextEncodingName() const
{
- return std::string( ewk_settings_default_text_encoding_name_get( ewkSettings ) );
+ const char* name = ewk_settings_default_text_encoding_name_get( ewkSettings );
+ return name ? std::string(name) : std::string();
}
void TizenWebEngineSettings::SetDefaultTextEncodingName( const std::string& defaultTextEncodingName )
namespace
{
-const std::string EMPTY_STRING;
-
LWE::KeyValue KeyStringToKeyValue(const char* DALIKeyString, bool isShiftPressed)
{
LWE::KeyValue keyValue = LWE::KeyValue::UnidentifiedKey;
void AllowScriptsOpenWindows( bool allowed ) override {}
bool AreImagesLoadedAutomatically() const override { return false; }
void AllowImagesLoadAutomatically( bool automatic ) override {}
- std::string GetDefaultTextEncodingName() const override { return EMPTY_STRING; }
+ std::string GetDefaultTextEncodingName() const override { return std::string(); }
void SetDefaultTextEncodingName( const std::string& defaultTextEncodingName ) override { }
bool SetViewportMetaTag(bool enable) override {return false;}
bool SetForceZoom(bool enable) override {return false;}
}
void SetCacheModel(CacheModel cacheModel) override {}
void SetProxyUri(const std::string& uri) override {}
+ std::string GetProxyUri() const override { return ""; }
+ void SetProxyBypassRule(const std::string& proxy, const std::string& bypass) override { }
+ std::string GetProxyBypassRule() const override { return ""; }
void SetDefaultProxyAuth(const std::string& username, const std::string& password) override {}
void SetCertificateFilePath(const std::string& certificatePath) override {}
+ std::string GetCertificateFilePath() const override { return ""; }
void DeleteAllWebDatabase() override {}
bool GetWebDatabaseOrigins(WebEngineSecurityOriginAcquiredCallback callback) override
{
void RegisterMimeOverriddenCallback(WebEngineMimeOverriddenCallback callback) override {}
void EnableCache(bool cacheDisabled) override {}
bool IsCacheEnabled() const override { return false; }
- std::string GetContextCertificateFile() const override { return ""; }
- void SetContextAppId(const std::string& appID) override { }
- bool SetContextAppVersion(const std::string& appVersion) override { return false; }
- void SetContextApplicationType(const ApplicationType applicationType) override { }
- void SetContextTimeOffset(float timeOffset) override { }
- void SetContextTimeZoneOffset(float timeZoneOffset, float daylightSavingTime) override { }
+ void SetAppId(const std::string& appId) override { }
+ bool SetAppVersion(const std::string& appVersion) override { return false; }
+ void SetApplicationType(const ApplicationType applicationType) override { }
+ void SetTimeOffset(float timeOffset) override { }
+ void SetTimeZoneOffset(float timeZoneOffset, float daylightSavingTime) override { }
+ void SetDefaultZoomFactor(float zoomFactor) override { }
+ float GetDefaultZoomFactor() const override { return 0;}
void RegisterUrlSchemesAsCorsEnabled(const std::vector<std::string>& schemes) override { }
void RegisterJsPluginMimeTypes(const std::vector<std::string>& mimeTypes) override { }
- void SetDefaultZoomFactor(float zoomFactor) override { }
- float GetContextDefaultZoomFactor() const override { return 0;}
bool DeleteAllApplicationCache() override { return false; }
bool DeleteAllWebIndexedDatabase() override { return false; }
void DeleteFormPasswordDataList(const std::vector<std::string>& list) override { }
void DeleteAllFormPasswordData() override { }
void DeleteAllFormCandidateData() override { }
- std::string GetContextProxy() const override { return ""; }
- void SetContextProxy(const std::string& proxy, const std::string& bypass) override { }
- std::string GetProxyBypassRule() const override { return ""; }
bool FreeUnusedMemory() override { return false; }
};
class NullWebEngineBackForwardListItem : public Dali::WebEngineBackForwardListItem
{
public:
- std::string GetUrl() const override { return EMPTY_STRING; }
- std::string GetTitle() const override { return EMPTY_STRING; }
- std::string GetOriginalUrl() const override { return EMPTY_STRING; }
+ std::string GetUrl() const override { return std::string(); }
+ std::string GetTitle() const override { return std::string(); }
+ std::string GetOriginalUrl() const override { return std::string(); }
};
// NOT IMPLEMENTED
return Dali::PixelData();
}
-const std::string& TizenWebEngineLWE::GetUrl()
+std::string TizenWebEngineLWE::GetUrl() const
{
DALI_ASSERT_ALWAYS(mWebContainer);
return mUrl;
// NOT IMPLEMENTED
}
-const std::string& TizenWebEngineLWE::GetUserAgent() const
+std::string TizenWebEngineLWE::GetUserAgent() const
{
// NOT IMPLEMENTED
- return EMPTY_STRING;
+ return std::string();
}
void TizenWebEngineLWE::SetUserAgent(const std::string& userAgent)
std::string TizenWebEngineLWE::GetSelectedText() const
{
// NOT IMPLEMENTED
- return EMPTY_STRING;
+ return std::string();
}
void TizenWebEngineLWE::DispatchMouseDownEvent(float x, float y)
/**
* @copydoc Dali::WebEnginePlugin::GetUrl()
*/
- const std::string& GetUrl() override;
+ std::string GetUrl() const override;
/**
* @copydoc Dali::WebEnginePlugin::LoadHTMLString()
/**
* @copydoc Dali::WebEnginePlugin::GetUserAgent()
*/
- const std::string& GetUserAgent() const override;
+ std::string GetUserAgent() const override;
/**
* @copydoc Dali::WebEnginePlugin::SetUserAgent()
/**
* @copydoc Dali::WebEnginePlugin::GetScreenshotAsynchronously()
*/
- bool
- GetScreenshotAsynchronously(Dali::Rect<int32_t> viewArea, float scaleFactor, ScreenshotCapturedCallback callback) override;
+ bool GetScreenshotAsynchronously(Dali::Rect<int32_t> viewArea, float scaleFactor, ScreenshotCapturedCallback callback) override;
/**
* @copydoc Dali::WebEnginePlugin::CheckVideoPlayingAsynchronously()
}
/**
- * @copydoc Dali::WebEnginePlugin::ContextMenuCustomizedSignal()
+ * @copydoc Dali::WebEnginePlugin::ContextMenuShownSignal()
*/
- Dali::WebEnginePlugin::WebEngineContextMenuCustomizedSignalType& ContextMenuCustomizedSignal() override
+ Dali::WebEnginePlugin::WebEngineContextMenuShownSignalType& ContextMenuShownSignal() override
{
- return mContextMenuCustomizedSignal;
+ return mContextMenuShownSignal;
}
/**
- * @copydoc Dali::WebEnginePlugin::ContextMenuItemSelectedSignal()
+ * @copydoc Dali::WebEnginePlugin::ContextMenuHiddenSignal()
*/
- Dali::WebEnginePlugin::WebEngineContextMenuItemSelectedSignalType& ContextMenuItemSelectedSignal() override
+ Dali::WebEnginePlugin::WebEngineContextMenuHiddenSignalType& ContextMenuHiddenSignal() override
{
- return mContextMenuItemSelectedSignal;
+ return mContextMenuHiddenSignal;
}
private:
EventThreadCallback mUpdateBufferTrigger;
- Dali::WebEnginePlugin::WebEnginePageLoadSignalType mPageLoadStartedSignal;
- Dali::WebEnginePlugin::WebEnginePageLoadSignalType mPageLoadInProgressSignal;
- Dali::WebEnginePlugin::WebEnginePageLoadSignalType mPageLoadFinishedSignal;
- Dali::WebEnginePlugin::WebEnginePageLoadErrorSignalType mPageLoadErrorSignal;
- Dali::WebEnginePlugin::WebEngineScrollEdgeReachedSignalType mScrollEdgeReachedSignal;
- Dali::WebEnginePlugin::WebEngineUrlChangedSignalType mUrlChangedSignal;
- Dali::WebEnginePlugin::WebEngineFormRepostDecisionSignalType mFormRepostDecisionSignal;
- Dali::WebEnginePlugin::WebEngineFrameRenderedSignalType mFrameRenderedSignal;
- Dali::WebEnginePlugin::WebEngineRequestInterceptorSignalType mRequestInterceptorSignal;
- Dali::WebEnginePlugin::WebEngineConsoleMessageSignalType mConsoleMessageSignal;
- Dali::WebEnginePlugin::WebEngineResponsePolicyDecisionSignalType mResponsePolicyDecisionSignal;
- Dali::WebEnginePlugin::WebEngineCertificateSignalType mCertificateConfirmSignal;
- Dali::WebEnginePlugin::WebEngineCertificateSignalType mSslCertificateChangedSignal;
- Dali::WebEnginePlugin::WebEngineHttpAuthHandlerSignalType mHttpAuthHandlerSignal;
- Dali::WebEnginePlugin::WebEngineContextMenuCustomizedSignalType mContextMenuCustomizedSignal;
- Dali::WebEnginePlugin::WebEngineContextMenuItemSelectedSignalType mContextMenuItemSelectedSignal;
+ Dali::WebEnginePlugin::WebEnginePageLoadSignalType mPageLoadStartedSignal;
+ Dali::WebEnginePlugin::WebEnginePageLoadSignalType mPageLoadInProgressSignal;
+ Dali::WebEnginePlugin::WebEnginePageLoadSignalType mPageLoadFinishedSignal;
+ Dali::WebEnginePlugin::WebEnginePageLoadErrorSignalType mPageLoadErrorSignal;
+ Dali::WebEnginePlugin::WebEngineScrollEdgeReachedSignalType mScrollEdgeReachedSignal;
+ Dali::WebEnginePlugin::WebEngineUrlChangedSignalType mUrlChangedSignal;
+ Dali::WebEnginePlugin::WebEngineFormRepostDecisionSignalType mFormRepostDecisionSignal;
+ Dali::WebEnginePlugin::WebEngineFrameRenderedSignalType mFrameRenderedSignal;
+ Dali::WebEnginePlugin::WebEngineRequestInterceptorSignalType mRequestInterceptorSignal;
+ Dali::WebEnginePlugin::WebEngineConsoleMessageSignalType mConsoleMessageSignal;
+ Dali::WebEnginePlugin::WebEngineResponsePolicyDecisionSignalType mResponsePolicyDecisionSignal;
+ Dali::WebEnginePlugin::WebEngineCertificateSignalType mCertificateConfirmSignal;
+ Dali::WebEnginePlugin::WebEngineCertificateSignalType mSslCertificateChangedSignal;
+ Dali::WebEnginePlugin::WebEngineHttpAuthHandlerSignalType mHttpAuthHandlerSignal;
+ Dali::WebEnginePlugin::WebEngineContextMenuShownSignalType mContextMenuShownSignal;
+ Dali::WebEnginePlugin::WebEngineContextMenuHiddenSignalType mContextMenuHiddenSignal;
};
} // namespace Plugin