Index: android_webview/browser/browser_view_renderer.h |
diff --git a/android_webview/browser/browser_view_renderer.h b/android_webview/browser/browser_view_renderer.h |
index 52f917e9345c653f15fa53e4a78b6d3899d5ffcc..dad70edc8049d6b83797d3e806e3cb540cfda2c5 100644 |
--- a/android_webview/browser/browser_view_renderer.h |
+++ b/android_webview/browser/browser_view_renderer.h |
@@ -8,6 +8,7 @@ |
#include "base/android/scoped_java_ref.h" |
#include "ui/gfx/point.h" |
#include "ui/gfx/rect.h" |
+#include "ui/gfx/vector2d_f.h" |
struct AwDrawGLInfo; |
struct AwDrawSWFunctionTable; |
@@ -16,10 +17,6 @@ namespace content { |
class ContentViewCore; |
} |
-namespace gfx { |
-class Rect; |
-} |
- |
namespace android_webview { |
// Interface for all the WebView-specific content rendering operations. |
@@ -43,6 +40,9 @@ class BrowserViewRenderer { |
// Called to get view's absolute location on the screen. |
virtual gfx::Point GetLocationOnScreen() = 0; |
+ // Try to set the view's scroll offset to |new_value|. |
+ virtual void ScrollContainerViewTo(gfx::Vector2d new_value) = 0; |
+ |
protected: |
virtual ~Client() {} |
}; |
@@ -88,7 +88,7 @@ class BrowserViewRenderer { |
// scroll offset. |clip| is the canvas's clip bounds. |
virtual bool OnDraw(jobject java_canvas, |
bool is_hardware_canvas, |
- const gfx::Point& scroll, |
+ const gfx::Vector2d& scroll, |
const gfx::Rect& clip) = 0; |
// Called in response to a prior Client::RequestDrawGL() call. See |
// AwDrawGLInfo documentation for more details of the contract. |
@@ -104,6 +104,12 @@ class BrowserViewRenderer { |
virtual void OnAttachedToWindow(int width, int height) = 0; |
virtual void OnDetachedFromWindow() = 0; |
+ // Sets the scale for logical<->physical pixel conversions. |
+ virtual void SetDipScale(float dip_scale) = 0; |
+ |
+ // Set the root layer scroll offset to |new_value|. |
+ virtual void ScrollTo(gfx::Vector2d new_value) = 0; |
+ |
// Android views hierarchy gluing. |
virtual bool IsAttachedToWindow() = 0; |
virtual bool IsViewVisible() = 0; |