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

Unified Diff: android_webview/browser/in_process_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: nit 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
Index: android_webview/browser/in_process_view_renderer.h
diff --git a/android_webview/browser/in_process_view_renderer.h b/android_webview/browser/in_process_view_renderer.h
index 55d5415be40deccabba0173b6cdef882ddf1ea3d..27cf399abae19897fb9b772c609175a489ebcb01 100644
--- a/android_webview/browser/in_process_view_renderer.h
+++ b/android_webview/browser/in_process_view_renderer.h
@@ -9,6 +9,7 @@
#include "base/memory/weak_ptr.h"
#include "content/public/browser/android/synchronous_compositor_client.h"
+#include "ui/gfx/vector2d_f.h"
namespace content {
class SynchronousCompositor;
@@ -37,7 +38,7 @@ class InProcessViewRenderer : public BrowserViewRenderer,
content::ContentViewCore* content_view_core) OVERRIDE;
virtual bool OnDraw(jobject java_canvas,
bool is_hardware_canvas,
- const gfx::Point& scroll,
+ const gfx::Vector2d& scroll_pix,
const gfx::Rect& clip) OVERRIDE;
virtual void DrawGL(AwDrawGLInfo* draw_info) OVERRIDE;
virtual base::android::ScopedJavaLocalRef<jobject> CapturePicture() OVERRIDE;
@@ -45,6 +46,7 @@ class InProcessViewRenderer : public BrowserViewRenderer,
virtual void OnVisibilityChanged(
bool view_visible, bool window_visible) OVERRIDE;
virtual void OnSizeChanged(int width, int height) OVERRIDE;
+ virtual void ScrollTo(gfx::Vector2dF new_value_css) OVERRIDE;
joth 2013/06/18 03:19:50 ah ha! over here you call it CSS pixels :)
mkosiba (inactive) 2013/06/18 18:09:25 see? making it explicit is paying off already :)
virtual void OnAttachedToWindow(int width, int height) OVERRIDE;
virtual void OnDetachedFromWindow() OVERRIDE;
virtual bool IsAttachedToWindow() OVERRIDE;
@@ -95,9 +97,10 @@ class InProcessViewRenderer : public BrowserViewRenderer,
EGLContext egl_context_at_init_;
// Last View scroll when View.onDraw() was called.
- gfx::Point scroll_at_start_of_frame_;
+ gfx::Vector2d scroll_at_start_of_frame_pix_;
- gfx::Vector2dF scroll_offset_;
+ // Current scroll offset in CSS pixels.
+ gfx::Vector2dF scroll_offset_css_;
base::WeakPtrFactory<InProcessViewRenderer> weak_factory_;

Powered by Google App Engine
This is Rietveld 408576698