diff options
author | mkosiba@chromium.org <mkosiba@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-11 18:22:13 +0000 |
---|---|---|
committer | mkosiba@chromium.org <mkosiba@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-11 18:22:13 +0000 |
commit | 93391c71dccc348470405a7d33e94ed30ba0f842 (patch) | |
tree | 264238fbbed0ffb665761d4b549fc08a987059f0 /android_webview | |
parent | 7d6a0a0bb9be26a8d66cc2663a5fca2bdd01a98a (diff) | |
download | chromium_src-93391c71dccc348470405a7d33e94ed30ba0f842.zip chromium_src-93391c71dccc348470405a7d33e94ed30ba0f842.tar.gz chromium_src-93391c71dccc348470405a7d33e94ed30ba0f842.tar.bz2 |
Delegate root layer scroll offset to android_webview.
This connects the LayerScrollOffsetDeleate to the android_webview
layer via the SynchronousCompositor.
BUG=b/6029133
TESTS=None
R=joth@chromium.org
Review URL: https://chromiumcodereview.appspot.com/15002007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205591 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'android_webview')
-rw-r--r-- | android_webview/browser/in_process_view_renderer.cc | 10 | ||||
-rw-r--r-- | android_webview/browser/in_process_view_renderer.h | 4 |
2 files changed, 14 insertions, 0 deletions
diff --git a/android_webview/browser/in_process_view_renderer.cc b/android_webview/browser/in_process_view_renderer.cc index ff45481..c321a6d 100644 --- a/android_webview/browser/in_process_view_renderer.cc +++ b/android_webview/browser/in_process_view_renderer.cc @@ -569,6 +569,16 @@ void InProcessViewRenderer::SetContinuousInvalidate(bool invalidate) { EnsureContinuousInvalidation(); } +void InProcessViewRenderer::SetTotalRootLayerScrollOffset( + gfx::Vector2dF new_value) { + // TODO(mkosiba): Plumb this all the way through to the view. + scroll_offset_ = new_value; +} + +gfx::Vector2dF InProcessViewRenderer::GetTotalRootLayerScrollOffset() { + return scroll_offset_; +} + void InProcessViewRenderer::Invalidate() { continuous_invalidate_task_pending_ = false; if (continuous_invalidate_) diff --git a/android_webview/browser/in_process_view_renderer.h b/android_webview/browser/in_process_view_renderer.h index 4175dd1..ab8193a 100644 --- a/android_webview/browser/in_process_view_renderer.h +++ b/android_webview/browser/in_process_view_renderer.h @@ -53,6 +53,8 @@ class InProcessViewRenderer : public BrowserViewRenderer, virtual void DidDestroyCompositor( content::SynchronousCompositor* compositor) OVERRIDE; virtual void SetContinuousInvalidate(bool invalidate) OVERRIDE; + virtual void SetTotalRootLayerScrollOffset(gfx::Vector2dF new_value) OVERRIDE; + virtual gfx::Vector2dF GetTotalRootLayerScrollOffset() OVERRIDE; void WebContentsGone(); @@ -91,6 +93,8 @@ class InProcessViewRenderer : public BrowserViewRenderer, // Last View scroll before hardware rendering is triggered. gfx::Point hw_rendering_scroll_; + gfx::Vector2dF scroll_offset_; + base::WeakPtrFactory<InProcessViewRenderer> weak_factory_; DISALLOW_COPY_AND_ASSIGN(InProcessViewRenderer); |