Chromium Code Reviews| 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..f1f1588dbdb24eacb1e64dfe6bcbcc9bb981edd5 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_pix|. |
| + virtual void ScrollContainerViewTo(gfx::Vector2d new_value_pix) = 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(double dip_scale) = 0; |
| + |
| + // Set the root layer scroll offset to |new_value_pix|. |
| + virtual void ScrollTo(gfx::Vector2d new_value_pix) = 0; |
|
joth
2013/06/19 05:34:45
ok you dropped _pix from scroll in OnDraw above, b
mkosiba (inactive)
2013/06/19 11:12:19
I'm not sure why I changed it to that. moving it b
|
| + |
| // Android views hierarchy gluing. |
| virtual bool IsAttachedToWindow() = 0; |
| virtual bool IsViewVisible() = 0; |