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_ |