Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(346)

Unified Diff: android_webview/browser/browser_view_renderer.h

Issue 16255010: Hookup android_webview scroll offset delegation to Java side. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix compile break Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | android_webview/browser/in_process_view_renderer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | android_webview/browser/in_process_view_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698