OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef REMOTING_CLIENT_INPUT_HANDLER_H_ | 5 #ifndef REMOTING_CLIENT_INPUT_HANDLER_H_ |
6 #define REMOTING_CLIENT_INPUT_HANDLER_H_ | 6 #define REMOTING_CLIENT_INPUT_HANDLER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/task.h" | 9 #include "base/task.h" |
10 #include "remoting/proto/event.pb.h" | 10 #include "remoting/proto/event.pb.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 InputHandler(ClientContext* context, | 23 InputHandler(ClientContext* context, |
24 protocol::ConnectionToHost* connection, | 24 protocol::ConnectionToHost* connection, |
25 ChromotingView* view); | 25 ChromotingView* view); |
26 virtual ~InputHandler() {} | 26 virtual ~InputHandler() {} |
27 | 27 |
28 virtual void Initialize() = 0; | 28 virtual void Initialize() = 0; |
29 | 29 |
30 protected: | 30 protected: |
31 void SendKeyEvent(bool press, int keycode); | 31 void SendKeyEvent(bool press, int keycode); |
32 void SendMouseMoveEvent(int x, int y); | 32 void SendMouseMoveEvent(int x, int y); |
33 void SendMouseButtonEvent(bool down, MouseButton button); | 33 void SendMouseButtonEvent(bool down, |
| 34 protocol::MouseEvent::MouseButton button); |
34 | 35 |
35 ClientContext* context_; | 36 ClientContext* context_; |
36 protocol::ConnectionToHost* connection_; | 37 protocol::ConnectionToHost* connection_; |
37 ChromotingView* view_; | 38 ChromotingView* view_; |
38 | 39 |
39 private: | 40 private: |
40 DISALLOW_COPY_AND_ASSIGN(InputHandler); | 41 DISALLOW_COPY_AND_ASSIGN(InputHandler); |
41 }; | 42 }; |
42 | 43 |
43 } // namespace remoting | 44 } // namespace remoting |
44 | 45 |
45 DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::InputHandler); | 46 DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::InputHandler); |
46 | 47 |
47 #endif // REMOTING_CLIENT_INPUT_HANDLER_H_ | 48 #endif // REMOTING_CLIENT_INPUT_HANDLER_H_ |
OLD | NEW |