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

Unified Diff: cc/input/input_handler.h

Issue 13844021: Move compositor thread input handling logic into content (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 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
« no previous file with comments | « no previous file | cc/test/fake_layer_tree_host_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/input/input_handler.h
diff --git a/cc/input/input_handler.h b/cc/input/input_handler.h
index b3f805e85c9fa5261608f80fb36944cfc69de8e0..2c73710cd860ed470ba9904ef5201ca5f0674c48 100644
--- a/cc/input/input_handler.h
+++ b/cc/input/input_handler.h
@@ -21,6 +21,21 @@ namespace cc {
class LayerScrollOffsetDelegate;
+class CC_EXPORT InputHandlerClient {
+ public:
+ virtual ~InputHandlerClient() {}
+
+ virtual void WillShutdown() = 0;
+ virtual void Animate(base::TimeTicks time) = 0;
+ virtual void MainThreadHasStoppedFlinging() = 0;
+
+ protected:
+ InputHandlerClient() {}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(InputHandlerClient);
+};
+
// The InputHandler is a way for the embedders to interact with the impl thread
// side of the compositor implementation. There is one InputHandler per
// LayerTreeHost. To use the input handler, implement the InputHanderClient
@@ -30,6 +45,11 @@ class CC_EXPORT InputHandler {
enum ScrollStatus { ScrollOnMainThread, ScrollStarted, ScrollIgnored };
enum ScrollInputType { Gesture, Wheel, NonBubblingGesture };
+ // Binds a client to this handler to receive notifications. Only one client
+ // can be bound to an InputHandler. The client must live at least until the
+ // handler calls WillShutdown() on the client.
+ virtual void BindToClient(InputHandlerClient* client) = 0;
+
// Selects a layer to be scrolled at a given point in viewport (logical
// pixel) coordinates. Returns ScrollStarted if the layer at the coordinates
// can be scrolled, ScrollOnMainThread if the scroll event should instead be
@@ -100,21 +120,6 @@ class CC_EXPORT InputHandler {
DISALLOW_COPY_AND_ASSIGN(InputHandler);
};
-class CC_EXPORT InputHandlerClient {
- public:
- virtual ~InputHandlerClient() {}
-
- virtual void BindToHandler(InputHandler* handler) = 0;
- virtual void Animate(base::TimeTicks time) = 0;
- virtual void MainThreadHasStoppedFlinging() = 0;
-
- protected:
- InputHandlerClient() {}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(InputHandlerClient);
-};
-
} // namespace cc
#endif // CC_INPUT_INPUT_HANDLER_H_
« no previous file with comments | « no previous file | cc/test/fake_layer_tree_host_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698