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

Unified Diff: cc/input/layer_scroll_offset_delegate.h

Issue 23533051: [android_webview] Use a fraction to calculate scroll offset. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: revert changes from previous patch set as they break AwSettings tests 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
« no previous file with comments | « android_webview/native/aw_contents.cc ('k') | cc/layers/layer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/input/layer_scroll_offset_delegate.h
diff --git a/cc/input/layer_scroll_offset_delegate.h b/cc/input/layer_scroll_offset_delegate.h
index 895d36d74908247cd3b2a984ed9d168a05a99180..66f9ad4b45ab601a55424d3bd37892992250d7b7 100644
--- a/cc/input/layer_scroll_offset_delegate.h
+++ b/cc/input/layer_scroll_offset_delegate.h
@@ -6,6 +6,7 @@
#define CC_INPUT_LAYER_SCROLL_OFFSET_DELEGATE_H_
#include "base/basictypes.h"
+#include "ui/gfx/size_f.h"
#include "ui/gfx/vector2d_f.h"
namespace cc {
@@ -16,6 +17,10 @@ namespace cc {
// The LayerScrollOffsetDelegate is only used on the impl thread.
class LayerScrollOffsetDelegate {
public:
+ // This is called by the compositor to notify the delegate what is the upper
+ // total scroll offset bound.
+ virtual void SetMaxScrollOffset(gfx::Vector2dF max_scroll_offset) = 0;
+
// This is called by the compositor when the scroll offset of the layer would
// have otherwise changed.
virtual void SetTotalScrollOffset(gfx::Vector2dF new_value) = 0;
@@ -25,9 +30,18 @@ class LayerScrollOffsetDelegate {
// There is no requirement that the return values of this method are
// stable in time (two subsequent calls may yield different results).
// The return value is not required to be related to the values passed in to
- // the SetTotalScrollOffset method in any way.
+ // the SetTotalScrollOffset method in any way however it is required to be no
+ // more than the value passed to the most recent SetMaxScrollOffset call.
virtual gfx::Vector2dF GetTotalScrollOffset() = 0;
+ // This is called by the compositor to notify the delegate what is the current
+ // page scale factor is.
+ virtual void SetPageScaleFactor(float page_scale_factor) = 0;
+
+ // This is called by the compositor to notify the delegate what is the layer's
+ // scrollable size is.
+ virtual void SetScrollableSize(gfx::SizeF scrollable_size) = 0;
+
protected:
LayerScrollOffsetDelegate() {}
virtual ~LayerScrollOffsetDelegate() {}
« no previous file with comments | « android_webview/native/aw_contents.cc ('k') | cc/layers/layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698