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);
return false;
}
-void TizenWebEngineChromium::ExitFullscreen()
-{
- ewk_view_fullscreen_exit(mWebView);
-}
-
void TizenWebEngineChromium::SetFocus(bool focused)
{
ecore_evas_focus_set(WebEngineManager::Get().GetWindow(), focused);
mNavigationPolicyDecidedCallback = callback;
}
-void TizenWebEngineChromium::RegisterNewWindowPolicyDecidedCallback(WebEngineNewWindowPolicyDecidedCallback callback)
-{
- mNewWindowPolicyDecidedCallback = callback;
-}
-
void TizenWebEngineChromium::RegisterNewWindowCreatedCallback(WebEngineNewWindowCreatedCallback callback)
{
mNewWindowCreatedCallback = callback;
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.
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");
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");
bool SendWheelEvent(const Dali::WheelEvent& event) override;
/**
- * @copydoc Dali::WebEnginePlugin::ExitFullscreen()
- */
- void ExitFullscreen() override;
-
- /**
* @copydoc Dali::WebEnginePlugin::RegisterFrameRenderedCallback()
*/
void RegisterFrameRenderedCallback(WebEngineFrameRenderedCallback callback) override;
void RegisterNavigationPolicyDecidedCallback(WebEngineNavigationPolicyDecidedCallback callback) override;
/**
- * @copydoc Dali::WebEnginePlugin::RegisterNewWindowPolicyDecidedCallback()
- */
- void RegisterNewWindowPolicyDecidedCallback(WebEngineNewWindowPolicyDecidedCallback callback) override;
-
- /**
* @copydoc Dali::WebEnginePlugin::RegisterNewWindowCreatedCallback()
*/
void RegisterNewWindowCreatedCallback(WebEngineNewWindowCreatedCallback callback) override;
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;
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*);
WebEngineConsoleMessageReceivedCallback mConsoleMessageReceivedCallback;
WebEngineResponsePolicyDecidedCallback mResponsePolicyDecidedCallback;
WebEngineNavigationPolicyDecidedCallback mNavigationPolicyDecidedCallback;
- WebEngineNewWindowPolicyDecidedCallback mNewWindowPolicyDecidedCallback;
WebEngineNewWindowCreatedCallback mNewWindowCreatedCallback;
WebEngineFrameRenderedCallback mFrameRenderedCallback;
WebEngineCertificateCallback mCertificateConfirmedCallback;
WebEngineHttpAuthHandlerCallback mHttpAuthHandlerCallback;
WebEngineContextMenuShownCallback mContextMenuShownCallback;
WebEngineContextMenuHiddenCallback mContextMenuHiddenCallback;
- WebEngineFullscreenEnteredCallback mFullscreenEnteredCallback;
- WebEngineFullscreenExitedCallback mFullscreenExitedCallback;
- WebEngineTextFoundCallback mTextFoundCallback;
WebEngineHitTestCreatedCallback mHitTestCreatedCallback;
JavaScriptAlertCallback mJavaScriptAlertCallback;
JavaScriptConfirmCallback mJavaScriptConfirmCallback;