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

Unified Diff: remoting/client/input_handler.h

Issue 3175028: Add mouse event support to Chromoting client (Pepper and X11). (Closed)
Patch Set: Remove win float/int conversion Created 10 years, 4 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 | « remoting/client/host_connection.h ('k') | remoting/client/input_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
};
« no previous file with comments | « remoting/client/host_connection.h ('k') | remoting/client/input_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698