Make web engine context be a singleton.
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / web-view / web-view-impl.h
old mode 100644 (file)
new mode 100755 (executable)
index 9abfd49..377ea61
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_WEB_VIEW_H
 
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // EXTERNAL INCLUDES
-#include <dali/devel-api/adaptor-framework/web-engine.h>
+#include <dali/devel-api/actors/actor-devel.h>
+#include <dali/devel-api/adaptor-framework/proxy-accessible.h>
+#include <dali/devel-api/adaptor-framework/web-engine/web-engine.h>
 #include <dali/public-api/images/image-operations.h>
 #include <dali/public-api/object/property-notification.h>
 #include <memory>
 
 // INTERNAL INCLUDES
+#include <dali-toolkit/devel-api/controls/control-accessible.h>
 #include <dali-toolkit/devel-api/controls/web-view/web-view.h>
 #include <dali-toolkit/devel-api/visual-factory/visual-base.h>
 #include <dali-toolkit/public-api/controls/control-impl.h>
@@ -37,8 +40,6 @@ namespace Toolkit
 class KeyEvent;
 class TouchEvent;
 class WebBackForwardList;
-class WebContext;
-class WebCookieManager;
 class WebSettings;
 class WebView;
 
@@ -51,7 +52,7 @@ protected:
 
   WebView(const std::string& locale, const std::string& timezoneId);
 
-  WebView(int argc, char** argv);
+  WebView(uint32_t argc, char** argv);
 
   virtual ~WebView();
 
@@ -67,36 +68,34 @@ public:
   static Toolkit::WebView New(const std::string& locale, const std::string& timezoneId);
 
   /**
-   * @brief Get settings of WebEngine.
+   * @copydoc Dali::Toolkit::WebView::New( uint32_t, char** )
    */
-  Dali::Toolkit::WebSettings* GetSettings() const;
+  static Toolkit::WebView New(uint32_t argc, char** argv);
 
   /**
-   * @brief Get context of WebEngine.
+   * @copydoc Dali::Toolkit::WebView::GetContext()
    */
-  Dali::Toolkit::WebContext* GetContext() const;
+  static Dali::WebEngineContext* GetContext();
 
   /**
-   * @brief Get cookie manager of WebEngine.
+   * @copydoc Dali::Toolkit::WebView::GetCookieManager()
    */
-  Dali::Toolkit::WebCookieManager* GetCookieManager() const;
+  static Dali::WebEngineCookieManager* GetCookieManager();
 
   /**
-   * @brief Get WebBackForwardList of WebEngine.
+   * @copydoc Dali::Toolkit::WebView::GetSettings()
    */
-  Dali::Toolkit::WebBackForwardList* GetBackForwardList() const;
+  Dali::Toolkit::WebSettings* GetSettings() const;
 
   /**
-   * @copydoc Dali::Toolkit::WebView::New( int, char** )
+   * @copydoc Dali::Toolkit::WebView::GetBackForwardList()
    */
-  static Toolkit::WebView New(int argc, char** argv);
+  Dali::Toolkit::WebBackForwardList* GetBackForwardList() const;
 
   /**
-   * @brief Get Favicon of web page.
-   *
-   * @return Handle to a fav icon
+   * @copydoc Dali::Toolkit::WebView::GetFavicon()
    */
-  Dali::Toolkit::ImageView& GetFavicon();
+  Dali::Toolkit::ImageView GetFavicon() const;
 
   /**
    * @copydoc Dali::Toolkit::WebView::LoadUrl()
@@ -109,11 +108,26 @@ public:
   void LoadHtmlString(const std::string& htmlString);
 
   /**
+   * @copydoc Dali::WebEngine::LoadHtmlStringOverrideCurrentEntry()
+   */
+  bool LoadHtmlStringOverrideCurrentEntry(const std::string& html, const std::string& basicUri, const std::string& unreachableUrl);
+
+  /**
+   * @copydoc Dali::WebEngine::LoadContents()
+   */
+  bool LoadContents(const std::string& contents, uint32_t contentSize, const std::string& mimeType, const std::string& encoding, const std::string& baseUri);
+
+  /**
    * @copydoc Dali::Toolkit::WebView::Reload()
    */
   void Reload();
 
   /**
+   * @copydoc Dali::WebEngine::ReloadWithoutCache()
+   */
+  bool ReloadWithoutCache();
+
+  /**
    * @copydoc Dali::Toolkit::WebView::StopLoading()
    */
   void StopLoading();
@@ -129,9 +143,44 @@ public:
   void Resume();
 
   /**
+   * @copydoc Dali::WebEngine::SuspendNetworkLoading()
+   */
+  void SuspendNetworkLoading();
+
+  /**
+   * @copydoc Dali::WebEngine::ResumeNetworkLoading()
+   */
+  void ResumeNetworkLoading();
+
+  /**
+   * @copydoc Dali::WebEngine::AddCustomHeader()
+   */
+  bool AddCustomHeader(const std::string& name, const std::string& value);
+
+  /**
+   * @copydoc Dali::WebEngine::RemoveCustomHeader()
+   */
+  bool RemoveCustomHeader(const std::string& name);
+
+  /**
+   * @copydoc Dali::WebEngine::StartInspectorServer()
+   */
+  uint32_t StartInspectorServer(uint32_t port);
+
+  /**
+   * @copydoc Dali::WebEngine::StopInspectorServer()
+   */
+  bool StopInspectorServer();
+
+  /**
    * @copydoc Dali::Toolkit::WebView::ScrollBy()
    */
-  void ScrollBy(int deltaX, int deltaY);
+  void ScrollBy(int32_t deltaX, int32_t deltaY);
+
+  /**
+   * @copydoc Dali::WebEngine::ScrollEdgeBy()
+   */
+  bool ScrollEdgeBy(int32_t deltaX, int32_t deltaY);
 
   /**
    * @copydoc Dali::Toolkit::WebView::CanGoForward()
@@ -156,12 +205,12 @@ public:
   /**
    * @copydoc Dali::Toolkit::WebView::EvaluateJavaScript()
    */
-  void EvaluateJavaScript(const std::string& script, std::function<void(const std::string&)> resultHandler);
+  void EvaluateJavaScript(const std::string& script, Dali::WebEnginePlugin::JavaScriptMessageHandlerCallback resultHandler);
 
   /**
    * @copydoc Dali::Toolkit::WebView::AddJavaScriptMessageHandler()
    */
-  void AddJavaScriptMessageHandler(const std::string& exposedObjectName, std::function<void(const std::string&)> handler);
+  void AddJavaScriptMessageHandler(const std::string& exposedObjectName, Dali::WebEnginePlugin::JavaScriptMessageHandlerCallback handler);
 
   /**
    * @copydoc Dali::Toolkit::WebView::RegisterJavaScriptAlertCallback()
@@ -194,44 +243,159 @@ public:
   void JavaScriptPromptReply(const std::string& result);
 
   /**
+   * @copydoc Dali::Toolkit::WebView::CreateHitTest()
+   */
+  std::unique_ptr<Dali::WebEngineHitTest> CreateHitTest(int32_t x, int32_t y, Dali::WebEngineHitTest::HitTestMode mode);
+
+  /**
+   * @copydoc Dali::Toolkit::WebView::CreateHitTestAsynchronously()
+   */
+  bool CreateHitTestAsynchronously(int32_t x, int32_t y, Dali::WebEngineHitTest::HitTestMode mode, Dali::WebEnginePlugin::WebEngineHitTestCreatedCallback callback);
+
+  /**
    * @copydoc Dali::Toolkit::WebView::ClearHistory()
    */
   void ClearHistory();
 
   /**
-   * @brief Clears all tiles resources of Web.
+   * @copydoc Dali::Toolkit::WebView::ClearAllTilesResources()
    */
   void ClearAllTilesResources();
 
   /**
-   * @copydoc Dali::Toolkit::WebView::PageLoadStartedSignal()
+   * @copydoc Dali::Toolkit::WebView::SetScaleFactor()
    */
-  Dali::Toolkit::WebView::WebViewPageLoadSignalType& PageLoadStartedSignal();
+  void SetScaleFactor(float scaleFactor, Dali::Vector2 point);
 
   /**
-   * @copydoc Dali::Toolkit::WebView::PageLoadInProgressSignal()
+   * @copydoc Dali::Toolkit::WebView::GetScaleFactor()
    */
-  Dali::Toolkit::WebView::WebViewPageLoadSignalType& PageLoadInProgressSignal();
+  float GetScaleFactor() const;
 
   /**
-   * @copydoc Dali::Toolkit::WebView::PageLoadFinishedSignal()
+   * @copydoc Dali::Toolkit::WebView::ActivateAccessibility()
    */
-  Dali::Toolkit::WebView::WebViewPageLoadSignalType& PageLoadFinishedSignal();
+  void ActivateAccessibility(bool activated);
 
   /**
-   * @copydoc Dali::Toolkit::WebView::PageLoadErrorSignal()
+   * @copydoc Dali::Toolkit::WebView::HighlightText()
    */
-  Dali::Toolkit::WebView::WebViewPageLoadErrorSignalType& PageLoadErrorSignal();
+  bool HighlightText(const std::string& text, Dali::WebEnginePlugin::FindOption options, uint32_t maxMatchCount);
 
   /**
-   * @copydoc Dali::Toolkit::WebView::ScrollEdgeReachedSignal()
+   * @copydoc Dali::Toolkit::WebView::AddDynamicCertificatePath()
    */
-  Dali::Toolkit::WebView::WebViewScrollEdgeReachedSignalType& ScrollEdgeReachedSignal();
+  void AddDynamicCertificatePath(const std::string& host, const std::string& certPath);
 
   /**
-   * @copydoc Dali::Toolkit::WebView::UrlChangedSignal()
+   * @copydoc Dali::Toolkit::WebView::GetScreenshot()
    */
-  Dali::Toolkit::WebView::WebViewUrlChangedSignalType& UrlChangedSignal();
+  Dali::Toolkit::ImageView GetScreenshot(Dali::Rect<int32_t> viewArea, float scaleFactor);
+
+  /**
+   * @copydoc Dali::Toolkit::WebView::GetScreenshotAsynchronously()
+   */
+  bool GetScreenshotAsynchronously(Dali::Rect<int32_t> viewArea, float scaleFactor, Dali::Toolkit::WebView::WebViewScreenshotCapturedCallback callback);
+
+  /**
+   * @copydoc Dali::Toolkit::WebView::CheckVideoPlayingAsynchronously()
+   */
+  bool CheckVideoPlayingAsynchronously(Dali::WebEnginePlugin::VideoPlayingCallback callback);
+
+  /**
+   * @copydoc Dali::Toolkit::WebView::RegisterGeolocationPermissionCallback()
+   */
+  void RegisterGeolocationPermissionCallback(Dali::WebEnginePlugin::GeolocationPermissionCallback callback);
+
+  /**
+   * @copydoc Dali::Toolkit::WebView::SetTtsFocus()
+   */
+  void SetTtsFocus(bool focused);
+
+  /**
+   * @copydoc Dali::Toolkit::WebView::RegisterPageLoadStartedCallback()
+   */
+  void RegisterPageLoadStartedCallback(Dali::WebEnginePlugin::WebEnginePageLoadCallback callback);
+
+  /**
+   * @copydoc Dali::Toolkit::WebView::RegisterPageLoadInProgressCallback()
+   */
+  void RegisterPageLoadInProgressCallback(Dali::WebEnginePlugin::WebEnginePageLoadCallback callback);
+
+  /**
+   * @copydoc Dali::Toolkit::WebView::RegisterPageLoadFinishedCallback()
+   */
+  void RegisterPageLoadFinishedCallback(Dali::WebEnginePlugin::WebEnginePageLoadCallback callback);
+
+  /**
+   * @copydoc Dali::Toolkit::WebView::RegisterPageLoadErrorCallback()
+   */
+  void RegisterPageLoadErrorCallback(Dali::WebEnginePlugin::WebEnginePageLoadErrorCallback callback);
+
+  /**
+   * @copydoc Dali::Toolkit::WebView::RegisterScrollEdgeReachedCallback()
+   */
+  void RegisterScrollEdgeReachedCallback(Dali::WebEnginePlugin::WebEngineScrollEdgeReachedCallback callback);
+
+  /**
+   * @copydoc Dali::Toolkit::WebView::RegisterUrlChangedCallback()
+   */
+  void RegisterUrlChangedCallback(Dali::WebEnginePlugin::WebEngineUrlChangedCallback callback);
+
+  /**
+   * @copydoc Dali::Toolkit::WebView::RegisterFormRepostDecidedCallback()
+   */
+  void RegisterFormRepostDecidedCallback(Dali::WebEnginePlugin::WebEngineFormRepostDecidedCallback callback);
+
+  /**
+   * @copydoc Dali::Toolkit::WebView::RegisterFrameRenderedCallback()
+   */
+  void RegisterFrameRenderedCallback(Dali::WebEnginePlugin::WebEngineFrameRenderedCallback callback);
+
+  /**
+   * @copydoc Dali::Toolkit::WebView::RegisterConsoleMessageReceivedCallback()
+   */
+  void RegisterConsoleMessageReceivedCallback(Dali::WebEnginePlugin::WebEngineConsoleMessageReceivedCallback callback);
+
+  /**
+   * @copydoc Dali::Toolkit::WebView::RegisterResponsePolicyDecidedCallback()
+   */
+  void RegisterResponsePolicyDecidedCallback(Dali::WebEnginePlugin::WebEngineResponsePolicyDecidedCallback callback);
+
+  /**
+   * @copydoc Dali::Toolkit::WebView::RegisterNavigationPolicyDecidedCallback()
+   */
+  void RegisterNavigationPolicyDecidedCallback(Dali::WebEnginePlugin::WebEngineNavigationPolicyDecidedCallback callback);
+
+  /**
+   * @copydoc Dali::Toolkit::WebView::RegisterCertificateConfirmedCallback()
+   */
+  void RegisterCertificateConfirmedCallback(Dali::WebEnginePlugin::WebEngineCertificateCallback callback);
+
+  /**
+   * @copydoc Dali::Toolkit::WebView::RegisterSslCertificateChangedCallback()
+   */
+  void RegisterSslCertificateChangedCallback(Dali::WebEnginePlugin::WebEngineCertificateCallback callback);
+
+  /**
+   * @copydoc Dali::Toolkit::WebView::RegisterHttpAuthHandlerCallback()
+   */
+  void RegisterHttpAuthHandlerCallback(Dali::WebEnginePlugin::WebEngineHttpAuthHandlerCallback callback);
+
+  /**
+   * @copydoc Dali::Toolkit::WebView::RegisterContextMenuShownCallback()
+   */
+  void RegisterContextMenuShownCallback(Dali::WebEnginePlugin::WebEngineContextMenuShownCallback callback);
+
+  /**
+   * @copydoc Dali::Toolkit::WebView::RegisterContextMenuHiddenCallback()
+   */
+  void RegisterContextMenuHiddenCallback(Dali::WebEnginePlugin::WebEngineContextMenuHiddenCallback callback);
+
+  /**
+   * @copydoc Dali::Toolkit::WebView::GetPlainTextAsynchronously()
+   */
+  void GetPlainTextAsynchronously(Dali::WebEnginePlugin::PlainTextReceivedCallback callback);
 
 public: // Properties
   /**
@@ -252,17 +416,6 @@ public: // Properties
    */
   static Dali::Property::Value GetProperty(Dali::BaseObject* object, Dali::Property::Index propertyIndex);
 
-  /**
-   * Connects a callback function with the object's signals.
-   * @param[in] object The object providing the signal.
-   * @param[in] tracker Used to disconnect the signal.
-   * @param[in] signalName The signal to connect to.
-   * @param[in] functor A newly allocated FunctorDelegate.
-   * @return True if the signal was connected.
-   * @post If a signal was connected, ownership of functor was passed to CallbackBase. Otherwise the c
-   */
-  static bool DoConnectSignal(BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor);
-
 private: // From Control
   /**
    * @copydoc Toolkit::Control::OnInitialize()
@@ -270,6 +423,11 @@ private: // From Control
   void OnInitialize() override;
 
   /**
+   * @copydoc Toolkit::Internal::Control::CreateAccessibleObject()
+   */
+  DevelControl::ControlAccessible* CreateAccessibleObject() override;
+
+  /**
    * @copydoc Toolkit::Control::GetNaturalSize
    */
   Vector3 GetNaturalSize() override;
@@ -301,45 +459,83 @@ private:
   WebView& operator=(const WebView& webView);
 
   /**
-   * @brief Sets an absolute scroll of the given view.
+   * @brief Set an absolute scroll of the given view.
    * @param[in] x The coordinate x of scroll
    * @param[in] y The coordinate y of scroll
    */
-  void SetScrollPosition(int x, int y);
+  void SetScrollPosition(int32_t x, int32_t y);
 
   /**
-   * @brief Gets the current scroll position of the given view.
+   * @brief Get the current scroll position of the given view.
    * @param[out] x The coordinate x of scroll
    * @param[out] y The coordinate y of scroll
    */
   Dali::Vector2 GetScrollPosition() const;
 
   /**
-   * @brief Gets the possible scroll size of the given view.
+   * @brief Get the possible scroll size of the given view.
    * @param[out] width The width of scroll size
    * @param[out] height The height of scroll size
    */
   Dali::Vector2 GetScrollSize() const;
 
   /**
-   * @brief Gets the last known content's size.
+   * @brief Get the last known content's size.
    * @param[out] width The width of content's size
    * @param[out] height The height of content's size
    */
   Dali::Vector2 GetContentSize() const;
 
   /**
-   * @brief Returns the title of the Web.
+   * @brief Return the title of the Web.
    *
    * @return The title of web page
    */
   std::string GetTitle() const;
 
   /**
+   * @brief Set the background color of web page.
+   * @param[in] color The value of background color.
+   */
+  void SetDocumentBackgroundColor(Dali::Vector4 color);
+
+  /**
+   * @brief Clear tiles when hidden.
+   *
+   * @param[in] cleared Whether tiles are cleared or not
+   */
+  void ClearTilesWhenHidden(bool cleared);
+
+  /**
+   * @brief Set multiplier of cover area of tile.
+   *
+   * @param[in] multiplier The multiplier of cover area
+   */
+  void SetTileCoverAreaMultiplier(float multiplier);
+
+  /**
+   * @brief Enable cursor by client.
+   * @param[in] enabled Whether cursor is enabled or not.
+   */
+  void EnableCursorByClient(bool enabled);
+
+  /**
+   * @brief Get the selected text.
+   * @return The selected text
+   */
+  std::string GetSelectedText() const;
+
+  /**
+   * @brief Get url of web page.
+   * @return The string of url
+   */
+  std::string GetUrl() const;
+
+  /**
    * @brief Get user agent string.
    * @return The string value of user agent
    */
-  const std::string& GetUserAgent() const;
+  std::string GetUserAgent() const;
 
   /**
    * @brief Set user agent string.
@@ -348,76 +544,84 @@ private:
   void SetUserAgent(const std::string& userAgent);
 
   /**
-   * @brief Updates display area of web view.
-   * @param[in] source The soource triggers Notification.
+   * @brief Set zoom factor of the current page.
+   * @param[in] zoomFactor a new factor to be set.
    */
-  void UpdateDisplayArea(Dali::PropertyNotification& source);
+  void SetPageZoomFactor(float zoomFactor);
 
   /**
-   * @brief Enable/Disable video hole for video playing.
-   * @param[in] enabled True if video hole is enabled, false otherwise.
+   * @brief Query the current zoom factor of the page。
+   * @return The current page zoom factor.
    */
-  void EnableVideoHole(bool enabled);
+  float GetPageZoomFactor() const;
 
   /**
-   * @brief Enable blend mode.
-   * @param[in] blendEnabled True if turn on blend mode, false otherwise.
+   * @brief Set the current text zoom level。.
+   * @param[in] zoomFactor a new factor to be set.
    */
-  void EnableBlendMode(bool blendEnabled);
+  void SetTextZoomFactor(float zoomFactor);
 
   /**
-   * @brief Enables/disables mouse events. The default is enabled.
-   *
-   * @param[in] enabled True if mouse events are enabled, false otherwise
+   * @brief Get the current text zoom level.
+   * @return The current text zoom factor.
    */
-  void EnableMouseEvents(bool enabled);
+  float GetTextZoomFactor() const;
+
+  /**
+   * @brief Get the current load progress of the page.
+   * @return The load progress of the page.
+   */
+  float GetLoadProgressPercentage() const;
 
   /**
-   * @brief Enables/disables key events. The default is enabled.
+   * @brief Request to set the current page's visibility.
+   * @param[in] visible Visible or not.
    *
-   * @param[in] enabled True if key events enabled, false otherwise
+   * @return true if succeeded, false otherwise
    */
-  void EnableKeyEvents(bool enabled);
+  bool SetVisibility(bool visible);
 
   /**
-   * @brief Callback function to be called when page load started.
-   * @param[in] url The url currently being loaded
+   * @brief Update display area of web view.
+   * @param[in] source The soource triggers Notification.
    */
-  void OnPageLoadStarted(const std::string& url);
+  void UpdateDisplayArea(Dali::PropertyNotification& source);
 
   /**
-   * @brief Callback function to be called when page is loading in progress.
-   * @param[in] url The url currently being loaded
+   * @brief Enable/Disable video hole for video playing.
+   * @param[in] enabled True if video hole is enabled, false otherwise.
    */
-  void OnPageLoadInProgress(const std::string& url);
+  void EnableVideoHole(bool enabled);
 
   /**
-   * @brief Callback function to be called when page load finished.
-   * @param[in] url The url currently being loaded
+   * @brief Enable blend mode.
+   * @param[in] blendEnabled True if turn on blend mode, false otherwise.
    */
-  void OnPageLoadFinished(const std::string& url);
+  void EnableBlendMode(bool blendEnabled);
 
   /**
-   * @brief Callback function to be called when there is an error in page loading.
-   * @param[in] url The url currently being loaded
-   * @param[in] errorCode The error code
+   * @brief Enable/disable mouse events. The default is enabled.
+   *
+   * @param[in] enabled True if mouse events are enabled, false otherwise
    */
-  void OnPageLoadError(const std::string& url, int errorCode);
+  void EnableMouseEvents(bool enabled);
 
   /**
-   * @brief Callback function to be called when scroll edge is reached.
-   * @param[in] e The scroll edge reached.
+   * @brief Enable/disable key events. The default is enabled.
+   *
+   * @param[in] enabled True if key events enabled, false otherwise
    */
-  void OnScrollEdgeReached(Dali::WebEnginePlugin::ScrollEdge edge);
+  void EnableKeyEvents(bool enabled);
 
   /**
-   * @brief Callback function to be called when url is changed.
-   * @param[in] url The url currently being loaded
+   * @brief Create image view by pixel data.
+   * @param[in] pixel Pixel data
+   * @return The new image view
    */
-  void OnUrlChanged(const std::string& url);
+  Dali::Toolkit::ImageView CreateImageView(Dali::PixelData pixel) const;
 
   /**
-   * Signal occurs when the Web View has been touched.
+   * @brief Signal occurs when the Web View has been touched.
    * @param[in] actor The Actor Touched
    * @param[in] touch The Touch Data.
    * @return Whether to consume event or not.
@@ -425,7 +629,7 @@ private:
   bool OnTouchEvent(Actor actor, const Dali::TouchEvent& touch);
 
   /**
-   * Signal occurs when the Web View has been hovered.
+   * @brief Signal occurs when the Web View has been hovered.
    * @param[in] actor The Actor Hovered
    * @param[in] hover The Hover Data.
    * @return Whether to consume event or not.
@@ -433,39 +637,78 @@ private:
   bool OnHoverEvent(Actor actor, const Dali::HoverEvent& hover);
 
   /**
-   * Signal occurs when the Web View receives wheel event.
+   * @brief Signal occurs when the Web View receives wheel event.
    * @param[in] actor The Actor that receives Wheel event.
    * @param[in] wheel The Wheel Data.
    * @return Whether to consume event or not.
    */
   bool OnWheelEvent(Actor actor, const Dali::WheelEvent& wheel);
 
+  /**
+   * @brief Callback function to be called when frame is rendered.
+   */
+  void OnFrameRendered();
+
+  /**
+   * @brief Callback function to be called when frame is rendered. This is to check initial buffer is ready.
+   */
+  void OnInitialFrameRendered();
+
+  /**
+   * @brief Callback function to be called when visibility is changed.
+   * @param[in] actor The actor, or child of actor, whose visibility has changed
+   * @param[in] isVisible Whether the actor is now visible or not
+   * @param[in] type, Whether the actor's visible property has changed or a parent's
+   */
+  void OnVisibilityChanged(Actor actor, bool isVisible, Dali::DevelActor::VisibilityChange::Type type);
+
+  /**
+   * @brief callback for screen shot captured.
+   * @param[in] pixel Pixel data of screen shot.
+   */
+  void OnScreenshotCaptured(Dali::PixelData pixel);
+
+protected:
+  class WebViewAccessible : public DevelControl::ControlAccessible
+  {
+  public:
+    WebViewAccessible() = delete;
+
+    WebViewAccessible(Dali::Actor self, Dali::WebEngine& webEngine);
+
+  protected:
+    /**
+     * @copydoc Dali::Accessibility::ActorAccessible::DoGetChildren()
+     */
+    void DoGetChildren(std::vector<Dali::Accessibility::Accessible*>& children) override;
+
+  private:
+    void OnAccessibilityEnabled();
+    void OnAccessibilityDisabled();
+    void SetRemoteChildAddress(Dali::Accessibility::Address address);
+
+    Dali::Accessibility::ProxyAccessible mRemoteChild;
+    Dali::WebEngine&                     mWebEngine;
+  };
+
 private:
-  std::string                 mUrl;
   Dali::Toolkit::Visual::Base mVisual;
   Dali::Size                  mWebViewSize;
   Dali::WebEngine             mWebEngine;
 
-  Dali::Toolkit::WebView::WebViewPageLoadSignalType          mPageLoadStartedSignal;
-  Dali::Toolkit::WebView::WebViewPageLoadSignalType          mPageLoadInProgressSignal;
-  Dali::Toolkit::WebView::WebViewPageLoadSignalType          mPageLoadFinishedSignal;
-  Dali::Toolkit::WebView::WebViewPageLoadErrorSignalType     mPageLoadErrorSignal;
-  Dali::Toolkit::WebView::WebViewScrollEdgeReachedSignalType mScrollEdgeReachedSignal;
-
-  std::unique_ptr<Dali::Toolkit::WebContext>         mWebContext;
-  std::unique_ptr<Dali::Toolkit::WebCookieManager>   mWebCookieManager;
   std::unique_ptr<Dali::Toolkit::WebSettings>        mWebSettings;
   std::unique_ptr<Dali::Toolkit::WebBackForwardList> mWebBackForwardList;
-  Dali::Toolkit::ImageView                           mFaviconView;
-
-  Dali::PropertyNotification                          mPositionUpdateNotification;
-  Dali::PropertyNotification                          mSizeUpdateNotification;
-  Dali::PropertyNotification                          mScaleUpdateNotification;
-  bool                                                mVideoHoleEnabled;
-  Dali::Rect<int>                                     mWebViewArea;
-  Dali::Toolkit::WebView::WebViewUrlChangedSignalType mUrlChangedSignal;
-  bool                                                mMouseEventsEnabled;
-  bool                                                mKeyEventsEnabled;
+
+  Dali::PropertyNotification mPositionUpdateNotification;
+  Dali::PropertyNotification mSizeUpdateNotification;
+  Dali::PropertyNotification mScaleUpdateNotification;
+  Dali::Rect<int32_t>        mWebViewArea;
+  bool                       mVideoHoleEnabled;
+  bool                       mMouseEventsEnabled;
+  bool                       mKeyEventsEnabled;
+
+  Dali::Toolkit::WebView::WebViewScreenshotCapturedCallback mScreenshotCapturedCallback;
+  Dali::WebEnginePlugin::WebEngineFrameRenderedCallback     mFrameRenderedCallback;
 };
 
 } // namespace Internal