[Tizen] Implement WebView::GetPlainTextAsynchronously
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / web-view / web-view-impl.h
old mode 100755 (executable)
new mode 100644 (file)
index e3e61b3..9aab208
@@ -22,6 +22,7 @@
 #include <memory>
 #include <dali/devel-api/adaptor-framework/web-engine.h>
 #include <dali/public-api/images/image-operations.h>
+#include <dali/public-api/object/property-notification.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/devel-api/controls/web-view/web-view.h>
@@ -96,11 +97,11 @@ public:
   static Toolkit::WebView New( int argc, char** argv );
 
   /**
-   * @brief Get Favicon of web page.
+   * @brief Get favicon of web page.
    *
-   * @return Handle to a fav icon
+   * @return Handle to a favicon
    */
-  Dali::Toolkit::ImageView& GetFavicon();
+  Dali::Toolkit::ImageView GetFavicon() const;
 
   /**
    * @copydoc Dali::Toolkit::WebView::LoadUrl()
@@ -178,6 +179,11 @@ public:
   void ClearHistory();
 
   /**
+   * @copydoc Dali::Toolkit::WebView::SetTtsFocus()
+   */
+  void SetTtsFocus(bool focused);
+
+  /**
    * @copydoc Dali::Toolkit::WebView::PageLoadStartedSignal()
    */
   Dali::Toolkit::WebView::WebViewPageLoadSignalType& PageLoadStartedSignal();
@@ -197,6 +203,11 @@ public:
    */
   Dali::Toolkit::WebView::WebViewScrollEdgeReachedSignalType& ScrollEdgeReachedSignal();
 
+  /**
+   * @copydoc Dali::Toolkit::WebView::GetPlainTextAsynchronously()
+   */
+  void GetPlainTextAsynchronously(Dali::WebEnginePlugin::PlainTextReceivedCallback callback);
+
 public: // Properties
 
   /**
@@ -241,11 +252,6 @@ private: // From Control
   Vector3 GetNaturalSize() override;
 
   /**
-   * @copydoc Toolkit::Control::OnRelayout()
-   */
-  void OnRelayout( const Vector2& size, RelayoutContainer& container ) override;
-
-  /**
    * Signal occurs when the Web View has been touched.
    * @param[in] actor The Actor Touched
    * @param[in] touch The Touch Data.
@@ -268,6 +274,11 @@ private: // From Control
    */
   void OnKeyInputFocusLost() override;
 
+  /**
+   * @copydoc Toolkit::Control::OnSceneConnection()
+   */
+  void OnSceneConnection( int depth ) override;
+
 private:
 
   // Undefined
@@ -323,6 +334,24 @@ private:
   void SetUserAgent( const std::string& userAgent );
 
   /**
+   * @brief Updates display area of web view.
+   * @param[in] source The soource triggers Notification.
+   */
+  void UpdateDisplayArea( Dali::PropertyNotification& source );
+
+  /**
+   * @brief Enable/Disable video hole for video playing.
+   * @param[in] enabled True if video hole is enabled, false otherwise.
+   */
+  void EnableVideoHole( bool enabled );
+
+  /**
+   * @brief Enable blend mode.
+   * @param[in] blendEnabled True if turn on blend mode, false otherwise.
+   */
+  void EnableBlendMode( bool blendEnabled );
+
+  /**
    * @brief Callback function to be called when page load started.
    * @param[in] url The url currently being loaded
    */
@@ -363,7 +392,12 @@ private:
   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;
 };
 
 } // namespace Internal