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

Unified Diff: cc/input/layer_scroll_offset_delegate.h

Issue 274323004: NOT FOR LANDING - [WebView] Allow fling animation via the LayerScrollOffsetDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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: 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 2da5f13befbd83739448f6e289a3f2b58e033ae7..d83d272fdaa7faf61e49faaa60e4349562618142 100644
--- a/cc/input/layer_scroll_offset_delegate.h
+++ b/cc/input/layer_scroll_offset_delegate.h
@@ -6,6 +6,8 @@
#define CC_INPUT_LAYER_SCROLL_OFFSET_DELEGATE_H_
#include "base/basictypes.h"
+#include "base/callback_forward.h"
+#include "base/time/time.h"
#include "ui/gfx/size_f.h"
#include "ui/gfx/vector2d_f.h"
@@ -36,6 +38,7 @@ class LayerScrollOffsetDelegate {
// This is called by the compositor to check whether a delegate-managed fling
// is active or not.
+ // TODO(jdduke): Remove?
mkosiba (inactive) 2014/05/15 13:48:51 maybe. This is still used by stuff like pageUp/pag
jdduke (slow) 2014/05/15 14:15:43 Gotcha, I suppose we could leave in for now.
virtual bool IsExternalFlingActive() const = 0;
// This is called by the compositor to notify the delegate what is the current
@@ -49,6 +52,11 @@ class LayerScrollOffsetDelegate {
// scrollable size is.
virtual void SetScrollableSize(const gfx::SizeF& scrollable_size) = 0;
+ // This is called by the compositor when a fling hitting the root layer
+ // requires a scheduled animation update.
+ typedef base::Callback<void(base::TimeTicks)> AnimationCallback;
+ virtual void SetNeedsAnimate(const AnimationCallback& animation) = 0;
+
protected:
LayerScrollOffsetDelegate() {}
virtual ~LayerScrollOffsetDelegate() {}

Powered by Google App Engine
This is Rietveld 408576698