Remove intercept request from chromium web engine plugin 22/260722/2
authorJiyun Yang <ji.yang@samsung.com>
Fri, 2 Jul 2021 00:03:44 +0000 (09:03 +0900)
committerJiyun Yang <ji.yang@samsung.com>
Fri, 2 Jul 2021 03:31:21 +0000 (12:31 +0900)
Intercept callback is called in other thread, so it must be handled in a special way.
Until then the corrent code need to be removed since it causes problem.

Change-Id: Icc221f4a7e9976ebf3aa3774bb1ae051a9c74b46
Signed-off-by: Jiyun Yang <ji.yang@samsung.com>
dali-extension/web-engine-chromium/tizen-web-engine-chromium.cpp
dali-extension/web-engine-chromium/tizen-web-engine-chromium.h

index 49df009..7b2de3f 100755 (executable)
@@ -29,7 +29,6 @@
 #include "tizen-web-engine-http-auth-handler.h"
 #include "tizen-web-engine-load-error.h"
 #include "tizen-web-engine-policy-decision.h"
-#include "tizen-web-engine-request-interceptor.h"
 #include "tizen-web-engine-settings.h"
 
 #include <Ecore_Evas.h>
@@ -213,7 +212,6 @@ public:
     mWebEngineSettings = TizenWebEngineSettings(settings);
 
     context = ewk_view_context_get(mWebView);
-    ewk_context_intercept_request_callback_set(context, &WebViewContainerForDali::OnInterceptRequest, &mClient);
     mWebEngineContext = TizenWebEngineContext(context);
 
     Ewk_Cookie_Manager* manager = ewk_context_cookie_manager_get(context);
@@ -864,13 +862,6 @@ private:
     client->LoadError(std::move(loadError));
   }
 
-  static void OnInterceptRequest(Ewk_Context*, Ewk_Intercept_Request* request, void* data)
-  {
-    auto client = static_cast<WebViewContainerClient*>(data);
-    std::shared_ptr<Dali::WebEngineRequestInterceptor> webInterceptor(new TizenWebEngineRequestInterceptor(request));
-    client->InterceptRequest(std::move(webInterceptor));
-  }
-
   static void OnUrlChanged(void* data, Evas_Object*, void* newUrl)
   {
     auto client = static_cast<WebViewContainerClient*>(data);
@@ -1948,15 +1939,6 @@ void TizenWebEngineChromium::RequestFormRepostDecision(std::shared_ptr<Dali::Web
   }
 }
 
-void TizenWebEngineChromium::InterceptRequest(std::shared_ptr<Dali::WebEngineRequestInterceptor> interceptor)
-{
-  DALI_LOG_RELEASE_INFO("#InterceptRequest.\n");
-  if (!mRequestInterceptorSignal.Empty())
-  {
-    mRequestInterceptorSignal.Emit(std::move(interceptor));
-  }
-}
-
 void TizenWebEngineChromium::OnConsoleMessage(std::shared_ptr<Dali::WebEngineConsoleMessage> message)
 {
   DALI_LOG_RELEASE_INFO("#OnConsoleMessage : %s\n", message->GetText());
index f289e90..a0e751d 100755 (executable)
@@ -97,13 +97,6 @@ public:
   virtual void UrlChanged(const std::string& url) = 0;
 
   /**
-   * @brief Callback function to be called by WebViewContainer when http request
-   * need be intercepted.
-   * @param [in] request The http request interceptor.
-   */
-  virtual void InterceptRequest(std::shared_ptr<Dali::WebEngineRequestInterceptor> interceptor) = 0;
-
-  /**
    * @brief Callback function to be called by WebViewContainer when console
    * message is logged out.
    * @param [in] message Message need be logged out.
@@ -775,11 +768,6 @@ public:
   void UrlChanged(const std::string& url) override;
 
   /**
-   * @copydoc Dali::Plugin::WebViewContainerClient::InterceptRequest()
-   */
-  void InterceptRequest(std::shared_ptr<Dali::WebEngineRequestInterceptor> interceptor) override;
-
-  /**
    * @copydoc Dali::Plugin::WebViewContainerClient::OnConsoleMessage()
    */
   void OnConsoleMessage(std::shared_ptr<Dali::WebEngineConsoleMessage> message) override;