Revert "[Tizen] Add WebView APIs for fullscreen, text found, etc."
authorJaehyun Cho <jae_hyun.cho@samsung.com>
Tue, 27 Aug 2024 06:41:42 +0000 (15:41 +0900)
committerJaehyun Cho <jae_hyun.cho@samsung.com>
Tue, 27 Aug 2024 06:41:42 +0000 (15:41 +0900)
This reverts commit 0fe0a9ae697df6a1ad242d7b09256c75699c9ca1.

dali-extension/web-engine-chromium/tizen-web-engine-chromium.cpp
dali-extension/web-engine-chromium/tizen-web-engine-chromium.h
dali-extension/web-engine-lwe/tizen-web-engine-lwe.cpp
dali-extension/web-engine-lwe/tizen-web-engine-lwe.h

index 9d344cb..184598b 100644 (file)
@@ -179,15 +179,11 @@ void TizenWebEngineChromium::InitWebView()
   evas_object_smart_callback_add(mWebView, "form,repost,warning,show", &TizenWebEngineChromium::OnFormRepostDecided, this);
   evas_object_smart_callback_add(mWebView, "policy,response,decide", &TizenWebEngineChromium::OnResponsePolicyDecided, this);
   evas_object_smart_callback_add(mWebView, "policy,navigation,decide", &TizenWebEngineChromium::OnNavigationPolicyDecided, this);
-  evas_object_smart_callback_add(mWebView, "policy,newwindow,decide", &TizenWebEngineChromium::OnNewWindowPolicyDecided, this);
   evas_object_smart_callback_add(mWebView, "create,window", &TizenWebEngineChromium::OnNewWindowCreated, this);
   evas_object_smart_callback_add(mWebView, "request,certificate,confirm", &TizenWebEngineChromium::OnCertificateConfirmed, this);
   evas_object_smart_callback_add(mWebView, "ssl,certificate,changed", &TizenWebEngineChromium::OnSslCertificateChanged, this);
   evas_object_smart_callback_add(mWebView, "contextmenu,show", &TizenWebEngineChromium::OnContextMenuShown, this);
   evas_object_smart_callback_add(mWebView, "contextmenu,hide", &TizenWebEngineChromium::OnContextMenuHidden, this);
-  evas_object_smart_callback_add(mWebView, "fullscreen,enterfullscreen", &TizenWebEngineChromium::OnFullscreenEntered, this);
-  evas_object_smart_callback_add(mWebView, "fullscreen,exitfullscreen", &TizenWebEngineChromium::OnFullscreenExited, this);
-  evas_object_smart_callback_add(mWebView, "text,found", &TizenWebEngineChromium::OnTextFound, this);
 
   evas_object_resize(mWebView, mWidth, mHeight);
   evas_object_show(mWebView);
@@ -696,11 +692,6 @@ bool TizenWebEngineChromium::SendWheelEvent(const Dali::WheelEvent& wheel)
   return false;
 }
 
-void TizenWebEngineChromium::ExitFullscreen()
-{
-  ewk_view_fullscreen_exit(mWebView);
-}
-
 void TizenWebEngineChromium::SetFocus(bool focused)
 {
   ecore_evas_focus_set(WebEngineManager::Get().GetWindow(), focused);
@@ -906,11 +897,6 @@ void TizenWebEngineChromium::RegisterNavigationPolicyDecidedCallback(WebEngineNa
   mNavigationPolicyDecidedCallback = callback;
 }
 
-void TizenWebEngineChromium::RegisterNewWindowPolicyDecidedCallback(WebEngineNewWindowPolicyDecidedCallback callback)
-{
-  mNewWindowPolicyDecidedCallback = callback;
-}
-
 void TizenWebEngineChromium::RegisterNewWindowCreatedCallback(WebEngineNewWindowCreatedCallback callback)
 {
   mNewWindowCreatedCallback = callback;
@@ -949,21 +935,6 @@ void TizenWebEngineChromium::RegisterContextMenuHiddenCallback(WebEngineContextM
   mContextMenuHiddenCallback = callback;
 }
 
-void TizenWebEngineChromium::RegisterFullscreenEnteredCallback(WebEngineFullscreenEnteredCallback callback)
-{
-  mFullscreenEnteredCallback = callback;
-}
-
-void TizenWebEngineChromium::RegisterFullscreenExitedCallback(WebEngineFullscreenExitedCallback callback)
-{
-  mFullscreenExitedCallback = callback;
-}
-
-void TizenWebEngineChromium::RegisterTextFoundCallback(WebEngineTextFoundCallback callback)
-{
-  mTextFoundCallback = callback;
-}
-
 Dali::PixelData TizenWebEngineChromium::ConvertImageColorSpace(Evas_Object* image)
 {
   // color-space is argb8888.
@@ -1119,15 +1090,6 @@ void TizenWebEngineChromium::OnNavigationPolicyDecided(void* data, Evas_Object*,
   ExecuteCallback(pThis->mNavigationPolicyDecidedCallback, std::move(webPolicyDecision));
 }
 
-void TizenWebEngineChromium::OnNewWindowPolicyDecided(void* data, Evas_Object*, void* policy)
-{
-  DALI_LOG_RELEASE_INFO("#NewWindowPolicyDecided.\n");
-  auto                                           pThis          = static_cast<TizenWebEngineChromium*>(data);
-  Ewk_Policy_Decision*                           policyDecision = static_cast<Ewk_Policy_Decision*>(policy);
-  std::unique_ptr<Dali::WebEnginePolicyDecision> webPolicyDecision(new TizenWebEnginePolicyDecision(policyDecision));
-  ExecuteCallback(pThis->mNewWindowPolicyDecidedCallback, std::move(webPolicyDecision));
-}
-
 void TizenWebEngineChromium::OnNewWindowCreated(void* data, Evas_Object*, void* out_view)
 {
   DALI_LOG_RELEASE_INFO("#NewWindowCreated.\n");
@@ -1180,28 +1142,6 @@ void TizenWebEngineChromium::OnContextMenuHidden(void* data, Evas_Object*, void*
   ExecuteCallback(pThis->mContextMenuHiddenCallback, std::move(contextMenu));
 }
 
-void TizenWebEngineChromium::OnFullscreenEntered(void* data, Evas_Object*, void*)
-{
-  auto pThis = static_cast<TizenWebEngineChromium*>(data);
-  DALI_LOG_RELEASE_INFO("#FullscreenEntered.\n");
-  ExecuteCallback(pThis->mFullscreenEnteredCallback);
-}
-
-void TizenWebEngineChromium::OnFullscreenExited(void* data, Evas_Object*, void*)
-{
-  auto pThis = static_cast<TizenWebEngineChromium*>(data);
-  DALI_LOG_RELEASE_INFO("#FullscreenExited.\n");
-  ExecuteCallback(pThis->mFullscreenExitedCallback);
-}
-
-void TizenWebEngineChromium::OnTextFound(void* data, Evas_Object*, void* eventInfo)
-{
-  auto pThis = static_cast<TizenWebEngineChromium*>(data);
-  uint32_t count = *((uint32_t*)(eventInfo));
-  DALI_LOG_RELEASE_INFO("#TextFound, count:%u.\n", count);
-  ExecuteCallback(pThis->mTextFoundCallback, count);
-}
-
 void TizenWebEngineChromium::OnAuthenticationChallenged(Evas_Object*, Ewk_Auth_Challenge* authChallenge, void* data)
 {
   DALI_LOG_RELEASE_INFO("#AuthenticationChallenged.\n");
index 6f1dab0..b2afb00 100644 (file)
@@ -448,11 +448,6 @@ public:
   bool SendWheelEvent(const Dali::WheelEvent& event) override;
 
   /**
-   * @copydoc Dali::WebEnginePlugin::ExitFullscreen()
-   */
-  void ExitFullscreen() override;
-
-  /**
    * @copydoc Dali::WebEnginePlugin::RegisterFrameRenderedCallback()
    */
   void RegisterFrameRenderedCallback(WebEngineFrameRenderedCallback callback) override;
@@ -508,11 +503,6 @@ public:
   void RegisterNavigationPolicyDecidedCallback(WebEngineNavigationPolicyDecidedCallback callback) override;
 
   /**
-   * @copydoc Dali::WebEnginePlugin::RegisterNewWindowPolicyDecidedCallback()
-   */
-  void RegisterNewWindowPolicyDecidedCallback(WebEngineNewWindowPolicyDecidedCallback callback) override;
-
-  /**
    * @copydoc Dali::WebEnginePlugin::RegisterNewWindowCreatedCallback()
    */
   void RegisterNewWindowCreatedCallback(WebEngineNewWindowCreatedCallback callback) override;
@@ -548,21 +538,6 @@ public:
   void RegisterContextMenuHiddenCallback(WebEngineContextMenuHiddenCallback callback) override;
 
   /**
-   * @copydoc Dali::WebEnginePlugin::RegisterFullscreenEnteredCallback()
-   */
-  void RegisterFullscreenEnteredCallback(WebEngineFullscreenEnteredCallback callback) override;
-
-  /**
-   * @copydoc Dali::WebEnginePlugin::RegisterFullscreenExitedCallback()
-   */
-  void RegisterFullscreenExitedCallback(WebEngineFullscreenExitedCallback callback) override;
-
-  /**
-   * @copydoc Dali::WebEnginePlugin::RegisterTextFoundCallback()
-   */
-  void RegisterTextFoundCallback(WebEngineTextFoundCallback callback) override;
-
-  /**
    * @copydoc Dali::WebEnginePlugin::GetPlainTextAsynchronously()
    */
   void GetPlainTextAsynchronously(PlainTextReceivedCallback callback) override;
@@ -570,32 +545,28 @@ public:
 private:
   static Dali::PixelData ConvertImageColorSpace(Evas_Object* image);
 
-  static void OnFrameRendered(void* data, Evas_Object*, void* buffer);
-  static void OnLoadStarted(void* data, Evas_Object*, void*);
-  static void OnLoadInProgress(void* data, Evas_Object*, void*);
-  static void OnLoadFinished(void* data, Evas_Object*, void*);
-  static void OnLoadError(void* data, Evas_Object*, void* rawError);
-  static void OnUrlChanged(void* data, Evas_Object*, void* newUrl);
-  static void OnConsoleMessageReceived(void* data, Evas_Object*, void* eventInfo);
-  static void OnEdgeLeft(void* data, Evas_Object*, void*);
-  static void OnEdgeRight(void* data, Evas_Object*, void*);
-  static void OnEdgeTop(void* data, Evas_Object*, void*);
-  static void OnEdgeBottom(void* data, Evas_Object*, void*);
-  static void OnFormRepostDecided(void* data, Evas_Object*, void* eventInfo);
-  static void OnResponsePolicyDecided(void* data, Evas_Object*, void* policy);
-  static void OnNavigationPolicyDecided(void* data, Evas_Object*, void* policy);
-  static void OnNewWindowPolicyDecided(void* data, Evas_Object*, void* policy);
-  static void OnNewWindowCreated(void* data, Evas_Object*, void* out_view);
-  static void OnCertificateConfirmed(void* data, Evas_Object*, void* eventInfo);
-  static void OnSslCertificateChanged(void* data, Evas_Object*, void* eventInfo);
-  static void OnContextMenuShown(void* data, Evas_Object*, void* eventInfo);
-  static void OnContextMenuHidden(void* data, Evas_Object*, void* eventInfo);
-  static void OnFullscreenEntered(void* data, Evas_Object*, void* eventInfo);
-  static void OnFullscreenExited(void* data, Evas_Object*, void* eventInfo);
-  static void OnTextFound(void* data, Evas_Object*, void* eventInfo);
-  static void OnAuthenticationChallenged(Evas_Object*, Ewk_Auth_Challenge* authChallenge, void* data);
-  static void OnJavaScriptEvaluated(Evas_Object* o, const char* result, void* data);
-  static void OnJavaScriptInjected(Evas_Object* o, Ewk_Script_Message message);
+  static void      OnFrameRendered(void* data, Evas_Object*, void* buffer);
+  static void      OnLoadStarted(void* data, Evas_Object*, void*);
+  static void      OnLoadInProgress(void* data, Evas_Object*, void*);
+  static void      OnLoadFinished(void* data, Evas_Object*, void*);
+  static void      OnLoadError(void* data, Evas_Object*, void* rawError);
+  static void      OnUrlChanged(void* data, Evas_Object*, void* newUrl);
+  static void      OnConsoleMessageReceived(void* data, Evas_Object*, void* eventInfo);
+  static void      OnEdgeLeft(void* data, Evas_Object*, void*);
+  static void      OnEdgeRight(void* data, Evas_Object*, void*);
+  static void      OnEdgeTop(void* data, Evas_Object*, void*);
+  static void      OnEdgeBottom(void* data, Evas_Object*, void*);
+  static void      OnFormRepostDecided(void* data, Evas_Object*, void* eventInfo);
+  static void      OnResponsePolicyDecided(void* data, Evas_Object*, void* policy);
+  static void      OnNavigationPolicyDecided(void* data, Evas_Object*, void* policy);
+  static void      OnNewWindowCreated(void* data, Evas_Object*, void* out_view);
+  static void      OnCertificateConfirmed(void* data, Evas_Object*, void* eventInfo);
+  static void      OnSslCertificateChanged(void* data, Evas_Object*, void* eventInfo);
+  static void      OnContextMenuShown(void* data, Evas_Object*, void* eventInfo);
+  static void      OnContextMenuHidden(void* data, Evas_Object*, void* eventInfo);
+  static void      OnAuthenticationChallenged(Evas_Object*, Ewk_Auth_Challenge* authChallenge, void* data);
+  static void      OnJavaScriptEvaluated(Evas_Object* o, const char* result, void* data);
+  static void      OnJavaScriptInjected(Evas_Object* o, Ewk_Script_Message message);
   static Eina_Bool OnJavaScriptAlert(Evas_Object* o, const char* alert_text, void*);
   static Eina_Bool OnJavaScriptConfirm(Evas_Object* o, const char* message, void*);
   static Eina_Bool OnJavaScriptPrompt(Evas_Object* o, const char* message, const char* default_value, void*);
@@ -635,7 +606,6 @@ private:
   WebEngineConsoleMessageReceivedCallback  mConsoleMessageReceivedCallback;
   WebEngineResponsePolicyDecidedCallback   mResponsePolicyDecidedCallback;
   WebEngineNavigationPolicyDecidedCallback mNavigationPolicyDecidedCallback;
-  WebEngineNewWindowPolicyDecidedCallback  mNewWindowPolicyDecidedCallback;
   WebEngineNewWindowCreatedCallback        mNewWindowCreatedCallback;
   WebEngineFrameRenderedCallback           mFrameRenderedCallback;
   WebEngineCertificateCallback             mCertificateConfirmedCallback;
@@ -643,9 +613,6 @@ private:
   WebEngineHttpAuthHandlerCallback         mHttpAuthHandlerCallback;
   WebEngineContextMenuShownCallback        mContextMenuShownCallback;
   WebEngineContextMenuHiddenCallback       mContextMenuHiddenCallback;
-  WebEngineFullscreenEnteredCallback       mFullscreenEnteredCallback;
-  WebEngineFullscreenExitedCallback        mFullscreenExitedCallback;
-  WebEngineTextFoundCallback               mTextFoundCallback;
   WebEngineHitTestCreatedCallback          mHitTestCreatedCallback;
   JavaScriptAlertCallback                  mJavaScriptAlertCallback;
   JavaScriptConfirmCallback                mJavaScriptConfirmCallback;
index 1a54c43..b957cda 100755 (executable)
@@ -1278,11 +1278,6 @@ bool TizenWebEngineLWE::SendWheelEvent(const Dali::WheelEvent& event)
   return false;
 }
 
-void TizenWebEngineLWE::ExitFullscreen()
-{
-  // NOT IMPLEMENTED
-}
-
 void TizenWebEngineLWE::RegisterFrameRenderedCallback(WebEngineFrameRenderedCallback callback)
 {
   // NOT IMPLEMENTED
@@ -1338,11 +1333,6 @@ void TizenWebEngineLWE::RegisterNavigationPolicyDecidedCallback(WebEngineNavigat
   // NOT IMPLEMENTED
 }
 
-void TizenWebEngineLWE::RegisterNewWindowPolicyDecidedCallback(WebEngineNewWindowPolicyDecidedCallback callback)
-{
-  // NOT IMPLEMENTED
-}
-
 void TizenWebEngineLWE::RegisterNewWindowCreatedCallback(WebEngineNewWindowCreatedCallback callback)
 {
   // NOT IMPLEMENTED
@@ -1373,21 +1363,6 @@ void TizenWebEngineLWE::RegisterContextMenuHiddenCallback(WebEngineContextMenuHi
   // NOT IMPLEMENTED
 }
 
-void TizenWebEngineLWE::RegisterFullscreenEnteredCallback(WebEngineFullscreenEnteredCallback callback)
-{
-  // NOT IMPLEMENTED
-}
-
-void TizenWebEngineLWE::RegisterFullscreenExitedCallback(WebEngineFullscreenExitedCallback callback)
-{
-  // NOT IMPLEMENTED
-}
-
-void TizenWebEngineLWE::RegisterTextFoundCallback(WebEngineTextFoundCallback callback)
-{
-  // NOT IMPLEMENTED
-}
-
 void TizenWebEngineLWE::GetPlainTextAsynchronously(PlainTextReceivedCallback callback)
 {
   // NOT IMPLEMENTED
index d48102a..a4adc7e 100755 (executable)
@@ -459,11 +459,6 @@ public:
   bool SendWheelEvent(const Dali::WheelEvent& event) override;
 
   /**
-   * @copydoc Dali::WebEnginePlugin::ExitFullscreen()
-   */
-  void ExitFullscreen() override;
-
-  /**
    * @copydoc Dali::WebEnginePlugin::RegisterFrameRenderedCallback()
    */
   void RegisterFrameRenderedCallback(WebEngineFrameRenderedCallback callback) override;
@@ -519,11 +514,6 @@ public:
   void RegisterNavigationPolicyDecidedCallback(WebEngineNavigationPolicyDecidedCallback callback) override;
 
   /**
-   * @copydoc Dali::WebEnginePlugin::RegisterNewWindowPolicyDecidedCallback()
-   */
-  void RegisterNewWindowPolicyDecidedCallback(WebEngineNewWindowPolicyDecidedCallback callback) override;
-
-  /**
    * @copydoc Dali::WebEnginePlugin::RegisterNewWindowCreatedCallback()
    */
   void RegisterNewWindowCreatedCallback(WebEngineNewWindowCreatedCallback callback) override;
@@ -554,21 +544,6 @@ public:
   void RegisterContextMenuHiddenCallback(WebEngineContextMenuHiddenCallback callback) override;
 
   /**
-   * @copydoc Dali::WebEnginePlugin::RegisterFullscreenEnteredCallback()
-   */
-  void RegisterFullscreenEnteredCallback(WebEngineFullscreenEnteredCallback callback) override;
-
-  /**
-   * @copydoc Dali::WebEnginePlugin::RegisterFullscreenExitedCallback()
-   */
-  void RegisterFullscreenExitedCallback(WebEngineFullscreenExitedCallback callback) override;
-
-  /**
-   * @copydoc Dali::WebEnginePlugin::RegisterTextFoundCallback()
-   */
-  void RegisterTextFoundCallback(WebEngineTextFoundCallback callback) override;
-
-  /**
    * @copydoc Dali::WebEnginePlugin::GetPlainTextAsynchronously()
    */
   void GetPlainTextAsynchronously(PlainTextReceivedCallback callback) override;