Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / public / web / WebWidget.h
index d0e1243..d191c26 100644 (file)
@@ -33,6 +33,7 @@
 
 #include "../platform/WebCanvas.h"
 #include "../platform/WebCommon.h"
+#include "../platform/WebPoint.h"
 #include "../platform/WebRect.h"
 #include "../platform/WebSize.h"
 #include "WebBeginFrameArgs.h"
@@ -46,7 +47,9 @@ class WebCompositeAndReadbackAsyncCallback;
 class WebInputEvent;
 class WebLayerTreeView;
 class WebMouseEvent;
+class WebPagePopup;
 class WebString;
+class WebWidgetClient;
 struct WebPoint;
 struct WebRenderingStats;
 template <typename T> class WebVector;
@@ -96,6 +99,11 @@ public:
     }
     virtual void beginFrame(const WebBeginFrameArgs& frameTime) { }
 
+    // Called to notify that a previously begun frame was finished and
+    // committed to the compositor. This is used to schedule lower priority
+    // work after tasks such as input processing and painting.
+    virtual void didCommitFrameToCompositor() { }
+
     // Called to layout the WebWidget. This MUST be called before Paint,
     // and it may result in calls to WebWidgetClient::didInvalidateRect.
     virtual void layout() { }
@@ -138,11 +146,20 @@ public:
     // Check whether the given point hits any registered touch event handlers.
     virtual bool hasTouchEventHandlersAt(const WebPoint&) { return true; }
 
-    // Applies a scroll delta to the root layer, which is bundled with a page
-    // scale factor that may apply a CSS transform on the whole document (used
-    // for mobile-device pinch zooming). This is triggered by events sent to the
-    // compositor thread.
-    virtual void applyScrollAndScale(const WebSize& scrollDelta, float scaleFactor) { }
+    // Applies viewport related properties during a commit from the compositor
+    // thread.
+    virtual void applyViewportDeltas(
+        const WebSize& scrollDelta,
+        float scaleFactor,
+        float topControlsDelta) { }
+
+    // Applies viewport related properties during a commit from the compositor
+    // thread.
+    virtual void applyViewportDeltas(
+        const WebSize& pinchViewportDelta,
+        const WebSize& mainFrameDelta,
+        float scaleFactor,
+        float topControlsDelta) { }
 
     // Called to inform the WebWidget that mouse capture was lost.
     virtual void mouseCaptureLost() { }
@@ -249,6 +266,13 @@ public:
     // content.
     virtual WebColor backgroundColor() const { return 0xFFFFFFFF; /* SK_ColorWHITE */ }
 
+    // The currently open page popup, which are calendar and datalist pickers
+    // but not the select popup.
+    virtual WebPagePopup* pagePopup() const { return 0; }
+
+    // Sets the height subtracted from the Widget to accomodate the top controls.
+    virtual void setTopControlsLayoutHeight(float) { }
+
 protected:
     ~WebWidget() { }
 };