Add APIs for showing/hiding context menu. 44/260244/5
authorhuayong.xu <huayong.xu@samsung.com>
Tue, 22 Jun 2021 10:26:43 +0000 (18:26 +0800)
committerhuayong.xu <huayong.xu@samsung.com>
Mon, 5 Jul 2021 02:50:06 +0000 (10:50 +0800)
1) Remove APIs for customizing context menu and selecting some menu
   item.
2) Rename some APIs in web context.
3) Fix some crashes when some ewk APIs return null string.

Change-Id: I0a39d63ef71dcc4d9dc48a326682ee4bd7554de2

19 files changed:
dali-extension/web-engine-chromium/tizen-web-engine-back-forward-list-item.cpp
dali-extension/web-engine-chromium/tizen-web-engine-certificate.cpp
dali-extension/web-engine-chromium/tizen-web-engine-chromium.cpp
dali-extension/web-engine-chromium/tizen-web-engine-chromium.h
dali-extension/web-engine-chromium/tizen-web-engine-console-message.cpp
dali-extension/web-engine-chromium/tizen-web-engine-context-menu-item.cpp
dali-extension/web-engine-chromium/tizen-web-engine-context-menu.cpp
dali-extension/web-engine-chromium/tizen-web-engine-context-menu.h
dali-extension/web-engine-chromium/tizen-web-engine-context.cpp
dali-extension/web-engine-chromium/tizen-web-engine-context.h
dali-extension/web-engine-chromium/tizen-web-engine-hit-test.cpp
dali-extension/web-engine-chromium/tizen-web-engine-http-auth-handler.cpp
dali-extension/web-engine-chromium/tizen-web-engine-load-error.cpp
dali-extension/web-engine-chromium/tizen-web-engine-policy-decision.cpp
dali-extension/web-engine-chromium/tizen-web-engine-request-interceptor.cpp
dali-extension/web-engine-chromium/tizen-web-engine-security-origin.cpp
dali-extension/web-engine-chromium/tizen-web-engine-settings.cpp
dali-extension/web-engine-lwe/tizen-web-engine-lwe.cpp
dali-extension/web-engine-lwe/tizen-web-engine-lwe.h

index bfb344a..b7674a5 100755 (executable)
@@ -38,17 +38,20 @@ TizenWebEngineBackForwardListItem::~TizenWebEngineBackForwardListItem()
 
 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
index d2e10e2..28d22a0 100755 (executable)
@@ -22,11 +22,6 @@ namespace Dali
 namespace Plugin
 {
 
-namespace
-{
-const std::string EMPTY_STRING;
-} // namespace
-
 TizenWebEngineCertificate::TizenWebEngineCertificate(Ewk_Certificate_Policy_Decision* decision)
   : ewkCertificatePolicyDecision(decision)
   , ewkCertificateInfo(0)
@@ -58,7 +53,12 @@ bool TizenWebEngineCertificate::IsFromMainFrame() const
 
 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
index 49df009..6cf1a42 100755 (executable)
@@ -54,12 +54,6 @@ namespace Dali
 namespace Plugin
 {
 
-namespace
-{
-// const
-const std::string EMPTY_STRING;
-} // namespace
-
 class WebViewContainerClientPair
 {
 public:
@@ -159,7 +153,6 @@ public:
     , mClient(client)
     , mWidth(width)
     , mHeight(height)
-    , mUserAgent()
     , mWebEngineSettings(0)
     , mWebEngineContext(0)
     , mWebEngineCookieManager(0)
@@ -175,7 +168,6 @@ public:
     , mClient(client)
     , mWidth(width)
     , mHeight(height)
-    , mUserAgent()
     , mWebEngineSettings(0)
     , mWebEngineContext(0)
     , mWebEngineCookieManager(0)
@@ -269,11 +261,11 @@ public:
     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);
@@ -294,7 +286,8 @@ public:
 
   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,
@@ -312,7 +305,8 @@ public:
 
   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()
@@ -487,10 +481,10 @@ public:
     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)
@@ -574,7 +568,8 @@ public:
 
   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)
@@ -971,20 +966,20 @@ private:
     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)
@@ -1052,7 +1047,6 @@ private:
 
   uint32_t    mWidth;
   uint32_t    mHeight;
-  std::string mUserAgent;
 
   TizenWebEngineSettings        mWebEngineSettings;
   TizenWebEngineContext         mWebEngineContext;
@@ -1137,7 +1131,7 @@ void TizenWebEngineChromium::LoadUrl(const std::string& path)
 
 std::string TizenWebEngineChromium::GetTitle() const
 {
-  return mWebViewContainer ? mWebViewContainer->GetTitle() : EMPTY_STRING;
+  return mWebViewContainer ? mWebViewContainer->GetTitle() : std::string();
 }
 
 Dali::PixelData TizenWebEngineChromium::GetFavicon() const
@@ -1150,13 +1144,9 @@ NativeImageInterfacePtr TizenWebEngineChromium::GetNativeImageSource()
   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)
@@ -1459,13 +1449,9 @@ void TizenWebEngineChromium::ClearAllTilesResources()
   }
 }
 
-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)
@@ -1590,11 +1576,7 @@ void TizenWebEngineChromium::EnableCursorByClient(bool enabled)
 
 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)
@@ -1875,14 +1857,14 @@ Dali::WebEnginePlugin::WebEngineHttpAuthHandlerSignalType& TizenWebEngineChromiu
   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
@@ -2002,21 +1984,21 @@ void TizenWebEngineChromium::AuthenticationChallenge(std::shared_ptr<Dali::WebEn
   }
 }
 
-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));
   }
 }
 
@@ -2080,6 +2062,7 @@ bool TizenWebEngineChromium::JavaScriptPrompt(const std::string& message, const
 
 void TizenWebEngineChromium::ScreenshotCaptured(Dali::PixelData pixelData)
 {
+  DALI_LOG_RELEASE_INFO("#ScreenshotCaptured.\n");
   if (mScreenshotCapturedCallback)
   {
     mScreenshotCapturedCallback(pixelData);
index f289e90..9f3296e 100755 (executable)
@@ -140,17 +140,17 @@ public:
 
   /**
    * @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
@@ -303,7 +303,7 @@ public:
   /**
    * @copydoc Dali::WebEnginePlugin::GetUrl()
    */
-  const std::string& GetUrl() override;
+  std::string GetUrl() const override;
 
   /**
    * @copydoc Dali::WebEnginePlugin::LoadHtmlString()
@@ -490,7 +490,7 @@ public:
   /**
    * @copydoc Dali::WebEnginePlugin::GetUserAgent()
    */
-  const std::string& GetUserAgent() const override;
+  std::string GetUserAgent() const override;
 
   /**
    * @copydoc Dali::WebEnginePlugin::SetUserAgent()
@@ -718,14 +718,14 @@ public:
   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
 
@@ -800,14 +800,14 @@ public:
   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
@@ -859,25 +859,24 @@ public:
 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;
index fbace1d..92ccb0c 100755 (executable)
@@ -33,7 +33,8 @@ TizenWebEngineConsoleMessage::~TizenWebEngineConsoleMessage()
 
 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
@@ -48,7 +49,8 @@ Dali::WebEngineConsoleMessage::SeverityLevel TizenWebEngineConsoleMessage::GetSe
 
 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
index a090146..ca2e1c9 100755 (executable)
@@ -52,17 +52,20 @@ bool TizenWebEngineContextMenuItem::IsEnabled() const
 
 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
index 9f0817c..9919273 100755 (executable)
@@ -86,16 +86,6 @@ bool TizenWebEngineContextMenu::SelectItem(Dali::WebEngineContextMenuItem& item)
   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);
index c9fe514..4b195dc 100755 (executable)
@@ -64,11 +64,6 @@ public:
   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;
index 66fcf60..eb133ec 100755 (executable)
@@ -56,9 +56,21 @@ void TizenWebEngineContext::SetProxyUri(const std::string& uri)
   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)
@@ -71,6 +83,12 @@ void TizenWebEngineContext::SetCertificateFilePath(const std::string& certificat
   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);
@@ -223,36 +241,41 @@ bool TizenWebEngineContext::IsCacheEnabled() const
   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;
@@ -275,16 +298,6 @@ void TizenWebEngineContext::RegisterJsPluginMimeTypes(const std::vector<std::str
   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);
@@ -316,16 +329,6 @@ void TizenWebEngineContext::DeleteAllFormCandidateData()
   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);
index dd6bd53..2fb5777 100755 (executable)
@@ -62,6 +62,21 @@ public:
   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;
@@ -72,6 +87,11 @@ public:
   void SetCertificateFilePath(const std::string& certificatePath) override;
 
   /**
+   * @copydoc Dali::WebEngineContext::GetCertificateFilePath()
+   */
+  std::string GetCertificateFilePath() const override;
+
+  /**
    * @copydoc Dali::WebEngineContext::DeleteAllWebDatabase()
    */
   void DeleteAllWebDatabase() override;
@@ -147,34 +167,39 @@ public:
   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()
@@ -187,16 +212,6 @@ public:
   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;
@@ -214,31 +229,14 @@ public:
   /**
    * @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;
index 9dc69ab..09b192d 100755 (executable)
@@ -46,37 +46,44 @@ Dali::WebEngineHitTest::ResultContext TizenWebEngineHitTest::GetResultContext()
 
 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
@@ -89,7 +96,8 @@ 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()
index c8ee29b..b83325a 100755 (executable)
@@ -33,7 +33,8 @@ TizenWebEngineHttpAuthHandler::~TizenWebEngineHttpAuthHandler()
 
 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()
index 0aa03bb..9d6c8b4 100755 (executable)
@@ -33,7 +33,8 @@ TizenWebEngineLoadError::~TizenWebEngineLoadError()
 
 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
@@ -48,7 +49,8 @@ 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
index ebd388c..953ef81 100755 (executable)
@@ -36,12 +36,14 @@ TizenWebEnginePolicyDecision::~TizenWebEnginePolicyDecision()
 
 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
@@ -51,7 +53,8 @@ Dali::WebEnginePolicyDecision::DecisionType TizenWebEnginePolicyDecision::GetDec
 
 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
@@ -73,7 +76,8 @@ Dali::WebEngineFrame& TizenWebEnginePolicyDecision::GetFrame() 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()
index 14e177a..4b0fa8f 100755 (executable)
@@ -33,7 +33,8 @@ TizenWebEngineRequestInterceptor::~TizenWebEngineRequestInterceptor()
 
 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()
index 76a05d6..55a6381 100755 (executable)
@@ -33,12 +33,14 @@ TizenWebEngineSecurityOrigin::~TizenWebEngineSecurityOrigin()
 
 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
index 15197a0..4d24da9 100755 (executable)
@@ -226,7 +226,8 @@ void TizenWebEngineSettings::AllowImagesLoadAutomatically( bool automatic )
 
 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 )
index 9e5dd34..57c8915 100755 (executable)
@@ -61,8 +61,6 @@ namespace Plugin
 namespace
 {
 
-const std::string EMPTY_STRING;
-
 LWE::KeyValue KeyStringToKeyValue(const char* DALIKeyString, bool isShiftPressed)
 {
   LWE::KeyValue keyValue = LWE::KeyValue::UnidentifiedKey;
@@ -536,7 +534,7 @@ public:
   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;}
@@ -564,8 +562,12 @@ public:
   }
   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
   {
@@ -599,24 +601,20 @@ public:
   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; }
 };
 
@@ -652,9 +650,9 @@ Dali::WebEngineCookieManager& TizenWebEngineLWE::GetCookieManager() const
 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
@@ -719,7 +717,7 @@ Dali::PixelData TizenWebEngineLWE::GetFavicon() const
   return Dali::PixelData();
 }
 
-const std::string& TizenWebEngineLWE::GetUrl()
+std::string TizenWebEngineLWE::GetUrl() const
 {
   DALI_ASSERT_ALWAYS(mWebContainer);
   return mUrl;
@@ -935,10 +933,10 @@ void TizenWebEngineLWE::ClearAllTilesResources()
   // 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)
@@ -1012,7 +1010,7 @@ void TizenWebEngineLWE::EnableCursorByClient(bool enabled)
 std::string TizenWebEngineLWE::GetSelectedText() const
 {
   // NOT IMPLEMENTED
-  return EMPTY_STRING;
+  return std::string();
 }
 
 void TizenWebEngineLWE::DispatchMouseDownEvent(float x, float y)
index 88d4e04..b8c349b 100755 (executable)
@@ -121,7 +121,7 @@ public:
   /**
    * @copydoc Dali::WebEnginePlugin::GetUrl()
    */
-  const std::string& GetUrl() override;
+  std::string GetUrl() const override;
 
   /**
    * @copydoc Dali::WebEnginePlugin::LoadHTMLString()
@@ -308,7 +308,7 @@ public:
   /**
    * @copydoc Dali::WebEnginePlugin::GetUserAgent()
    */
-  const std::string& GetUserAgent() const override;
+  std::string GetUserAgent() const override;
 
   /**
    * @copydoc Dali::WebEnginePlugin::SetUserAgent()
@@ -433,8 +433,7 @@ public:
   /**
    * @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()
@@ -579,19 +578,19 @@ public:
   }
 
   /**
-   * @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:
@@ -638,22 +637,22 @@ 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