Index: remoting/client/input_handler.h |
diff --git a/remoting/client/input_handler.h b/remoting/client/input_handler.h |
index 9cbdd7d7fe92ac1c35b68b2e4223efbabc574fc1..ef9659d0650afa5443e646f90bd733de49ac817c 100644 |
--- a/remoting/client/input_handler.h |
+++ b/remoting/client/input_handler.h |
@@ -7,6 +7,7 @@ |
#include "base/basictypes.h" |
#include "base/task.h" |
+#include "remoting/base/protocol/chromotocol.pb.h" |
namespace remoting { |
@@ -18,19 +19,29 @@ class InputHandler { |
public: |
InputHandler(ClientContext* context, |
HostConnection* connection, |
- ChromotingView* view) |
- : context_(context), |
- connection_(connection), |
- view_(view) {} |
+ ChromotingView* view); |
virtual ~InputHandler() {} |
virtual void Initialize() = 0; |
protected: |
+ void SendMouseMoveEvent(int x, int y); |
+ void SendMouseButtonEvent(bool down, MouseButton button); |
+ |
ClientContext* context_; |
HostConnection* connection_; |
ChromotingView* view_; |
+ private: |
+ // True if we should send the next mouse position as an absolute value rather |
+ // than a relative value. After sending a single absolute mouse position, |
+ // it will automatically switch back to sending relative mouse deltas. |
+ bool send_absolute_mouse_; |
+ |
+ // Current (x,y) position of mouse pointer. |
+ // This is the last value that we sent to the host. |
+ int mouse_x_, mouse_y_; |
+ |
DISALLOW_COPY_AND_ASSIGN(InputHandler); |
}; |