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

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: Created 7 years, 8 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') | cc/trees/layer_tree_host.h » ('J')
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 982befa39577a7559eb7617abb958a09dcd8a433..a4837f5f7d45904d6d76010ed941ac2ea030ee4d 100644
--- a/cc/input/input_handler.h
+++ b/cc/input/input_handler.h
@@ -19,6 +19,20 @@ class Vector2dF;
namespace cc {
+class CC_EXPORT InputHandlerClient {
+ public:
+ virtual ~InputHandlerClient() {}
+
+ 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
@@ -28,6 +42,10 @@ 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 outlive the InputHandler.
+ 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
@@ -88,21 +106,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') | cc/trees/layer_tree_host.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698