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

Unified Diff: content/browser/android/in_process/synchronous_compositor_impl.cc

Issue 23533051: [android_webview] Use a fraction to calculate scroll offset. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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: content/browser/android/in_process/synchronous_compositor_impl.cc
diff --git a/content/browser/android/in_process/synchronous_compositor_impl.cc b/content/browser/android/in_process/synchronous_compositor_impl.cc
index b04e85456f1d7f0095f97c66bc9f821f3f035731..bbf45b6886491a8cb4b2abb723d0c8a742abc93c 100644
--- a/content/browser/android/in_process/synchronous_compositor_impl.cc
+++ b/content/browser/android/in_process/synchronous_compositor_impl.cc
@@ -415,10 +415,18 @@ void SynchronousCompositorImpl::DidActivatePendingTree() {
compositor_client_->DidUpdateContent();
}
-void SynchronousCompositorImpl::SetTotalScrollOffset(gfx::Vector2dF new_value) {
+void SynchronousCompositorImpl::SetMaxScrollOffset(
+ gfx::Vector2dF max_scroll_offset) {
DCHECK(CalledOnValidThread());
if (compositor_client_)
+ compositor_client_->SetMaxRootLayerScrollOffset(max_scroll_offset);
+}
+
+void SynchronousCompositorImpl::SetTotalScrollOffset(gfx::Vector2dF new_value) {
+ DCHECK(CalledOnValidThread());
+ if (compositor_client_) {
compositor_client_->SetTotalRootLayerScrollOffset(new_value);
+ }
joth 2013/09/25 15:12:07 nit: why you add these here?
mkosiba (inactive) 2013/09/25 16:14:15 Done.
}
gfx::Vector2dF SynchronousCompositorImpl::GetTotalScrollOffset() {
@@ -428,6 +436,18 @@ gfx::Vector2dF SynchronousCompositorImpl::GetTotalScrollOffset() {
return gfx::Vector2dF();
}
+void SynchronousCompositorImpl::SetPageScaleFactor(float page_scale_factor) {
+ DCHECK(CalledOnValidThread());
+ if (compositor_client_)
+ compositor_client_->SetRootLayerPageScaleFactor(page_scale_factor);
+}
+
+void SynchronousCompositorImpl::SetScrollableSize(gfx::SizeF scrollable_size) {
+ DCHECK(CalledOnValidThread());
+ if (compositor_client_)
+ compositor_client_->SetRootLayerScrollableSize(scrollable_size);
+}
+
// Not using base::NonThreadSafe as we want to enforce a more exacting threading
// requirement: SynchronousCompositorImpl() must only be used on the UI thread.
bool SynchronousCompositorImpl::CalledOnValidThread() const {

Powered by Google App Engine
This is Rietveld 408576698