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

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: Fix test Created 5 years, 10 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 | « cc/input/input_handler.h ('k') | cc/trees/layer_tree_host_impl.h » ('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 02ba011118dfb5621bf3a53c482b8ae8c1a40e67..ab3d86a4c1ed1229d5616c0a1483ea0dd5550fa5 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/geometry/scroll_offset.h"
#include "ui/gfx/geometry/size_f.h"
@@ -44,8 +46,14 @@ class LayerScrollOffsetDelegate {
// This is called by the compositor to check whether a delegate-managed fling
// is active or not.
+ // TODO(jdduke): Remove?
virtual bool IsExternalFlingActive() const = 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() {}
« no previous file with comments | « cc/input/input_handler.h ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698