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 e24b25ca44a0987fc1d5a59dc0a216932fbce253..bea797c140b6fb0f8d158ae414240831604de32a 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_css|. |
+ virtual void ScrollContainerViewTo(gfx::Vector2dF new_value_css) = 0; |
+ |
protected: |
virtual ~Client() {} |
}; |
@@ -91,7 +91,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_pix, |
joth
2013/06/18 03:19:50
is _pix a standard convention? If not, it doesn't
mkosiba (inactive)
2013/06/18 18:09:25
it seems to be the convention used in RenderCorrdi
|
const gfx::Rect& clip) = 0; |
// Called in response to a prior Client::RequestDrawGL() call. See |
// AwDrawGLInfo documentation for more details of the contract. |
@@ -107,6 +107,10 @@ class BrowserViewRenderer { |
virtual void OnAttachedToWindow(int width, int height) = 0; |
virtual void OnDetachedFromWindow() = 0; |
+ // Set the root layer scroll offset to |new_value|. |new_value| is in |
+ // physical pixels. |
joth
2013/06/18 03:19:50
physical pixels? these are normally scalar, not fl
mkosiba (inactive)
2013/06/18 18:09:25
Done.
|
+ virtual void ScrollTo(gfx::Vector2dF new_value) = 0; |
+ |
// Android views hierarchy gluing. |
virtual bool IsAttachedToWindow() = 0; |
virtual bool IsViewVisible() = 0; |