+ mWebEngine.RegisterRequestInterceptorCallback(callback);
+ }
+}
+
+void WebView::RegisterConsoleMessageReceivedCallback(Dali::WebEnginePlugin::WebEngineConsoleMessageReceivedCallback callback)
+{
+ if(mWebEngine)
+ {
+ mWebEngine.RegisterConsoleMessageReceivedCallback(callback);
+ }
+}
+
+void WebView::RegisterResponsePolicyDecidedCallback(Dali::WebEnginePlugin::WebEngineResponsePolicyDecidedCallback callback)
+{
+ if(mWebEngine)
+ {
+ mWebEngine.RegisterResponsePolicyDecidedCallback(callback);
+ }
+}
+
+void WebView::RegisterCertificateConfirmedCallback(Dali::WebEnginePlugin::WebEngineCertificateCallback callback)
+{
+ if(mWebEngine)
+ {
+ mWebEngine.RegisterCertificateConfirmedCallback(callback);
+ }
+}
+
+void WebView::RegisterSslCertificateChangedCallback(Dali::WebEnginePlugin::WebEngineCertificateCallback callback)
+{
+ if(mWebEngine)
+ {
+ mWebEngine.RegisterSslCertificateChangedCallback(callback);
+ }
+}
+
+void WebView::RegisterHttpAuthHandlerCallback(Dali::WebEnginePlugin::WebEngineHttpAuthHandlerCallback callback)
+{
+ if(mWebEngine)
+ {
+ mWebEngine.RegisterHttpAuthHandlerCallback(callback);
+ }
+}
+
+void WebView::RegisterContextMenuShownCallback(Dali::WebEnginePlugin::WebEngineContextMenuShownCallback callback)
+{
+ if(mWebEngine)
+ {
+ mWebEngine.RegisterContextMenuShownCallback(callback);
+ }
+}
+
+void WebView::RegisterContextMenuHiddenCallback(Dali::WebEnginePlugin::WebEngineContextMenuHiddenCallback callback)
+{
+ if(mWebEngine)
+ {
+ mWebEngine.RegisterContextMenuHiddenCallback(callback);
+ }
+}
+
+void WebView::OnFrameRendered()
+{
+ if(mFrameRenderedCallback)
+ {
+ mFrameRenderedCallback();
+ }
+}
+
+void WebView::OnInitialFrameRendered()
+{
+ mWebEngine.FrameRenderedSignal().Disconnect(this, &WebView::OnInitialFrameRendered);
+
+ Texture texture = Dali::Texture::New(*mWebEngine.GetNativeImageSource());
+ const std::string nativeImageUrl = Dali::Toolkit::TextureManager::AddTexture(texture);
+ mVisual = Toolkit::VisualFactory::Get().CreateVisual({{Toolkit::Visual::Property::TYPE, Toolkit::Visual::IMAGE}, {Toolkit::ImageVisual::Property::URL, nativeImageUrl}});
+
+ if(mVisual)
+ {
+ DevelControl::RegisterVisual(*this, Toolkit::WebView::Property::URL, mVisual);
+ EnableBlendMode(!mVideoHoleEnabled);
+ }
+}
+
+void WebView::OnVisibilityChanged(Actor actor, bool isVisible, Dali::DevelActor::VisibilityChange::Type type)
+{
+ if(type == Dali::DevelActor::VisibilityChange::Type::SELF)
+ {
+ SetVisibility(isVisible);
+ }
+}
+
+void WebView::OnScreenshotCaptured(Dali::PixelData pixel)
+{
+ if(mScreenshotCapturedCallback)
+ {
+ Dali::Toolkit::ImageView imageView = CreateImageView(pixel);
+ mScreenshotCapturedCallback(imageView);
+ }
+}
+
+void WebView::OnSceneConnection(int depth)
+{
+ Control::OnSceneConnection(depth);
+ EnableBlendMode(!mVideoHoleEnabled);
+}
+
+bool WebView::OnTouchEvent(Actor actor, const Dali::TouchEvent& touch)
+{
+ bool result = false;
+
+ if(mWebEngine)
+ {
+ result = mWebEngine.SendTouchEvent(touch);
+ }
+ return result;
+}
+
+bool WebView::OnKeyEvent(const Dali::KeyEvent& event)
+{
+ bool result = false;
+
+ if(mWebEngine)
+ {
+ result = mWebEngine.SendKeyEvent(event);
+ }
+ return result;
+}
+
+bool WebView::OnHoverEvent(Actor actor, const Dali::HoverEvent& hover)
+{
+ bool result = false;
+ if(mWebEngine && mMouseEventsEnabled)
+ {
+ result = mWebEngine.SendHoverEvent(hover);
+ }
+ return result;
+}
+
+bool WebView::OnWheelEvent(Actor actor, const Dali::WheelEvent& wheel)
+{
+ bool result = false;
+ if(mWebEngine && mMouseEventsEnabled)
+ {
+ result = mWebEngine.SendWheelEvent(wheel);
+ }
+ return result;
+}
+
+void WebView::OnKeyInputFocusGained()
+{
+ if(mWebEngine)
+ {
+ mWebEngine.SetFocus(true);
+ }
+
+ EmitKeyInputFocusSignal(true); // Calls back into the Control hence done last.
+}
+
+void WebView::OnKeyInputFocusLost()
+{
+ if(mWebEngine)
+ {
+ mWebEngine.SetFocus(false);
+ }
+
+ EmitKeyInputFocusSignal(false); // Calls back into the Control hence done last.
+}
+
+Vector3 WebView::GetNaturalSize()
+{
+ if(mVisual)
+ {
+ Vector2 rendererNaturalSize;
+ mVisual.GetNaturalSize(rendererNaturalSize);
+ return Vector3(rendererNaturalSize);
+ }
+
+ return Vector3(mWebViewSize);
+}
+
+void WebView::SetProperty(BaseObject* object, Property::Index index, const Property::Value& value)
+{
+ Toolkit::WebView webView = Toolkit::WebView::DownCast(Dali::BaseHandle(object));
+
+ if(webView)
+ {
+ WebView& impl = GetImpl(webView);
+ switch(index)