#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>
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);
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);
}
}
-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());
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.
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;