OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <set> | 8 #include <set> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 | 29 |
30 virtual void Initialize() = 0; | 30 virtual void Initialize() = 0; |
31 | 31 |
32 void ReleaseAllKeys(); | 32 void ReleaseAllKeys(); |
33 | 33 |
34 protected: | 34 protected: |
35 void SendKeyEvent(bool press, int keycode); | 35 void SendKeyEvent(bool press, int keycode); |
36 void SendMouseMoveEvent(int x, int y); | 36 void SendMouseMoveEvent(int x, int y); |
37 void SendMouseButtonEvent(bool down, | 37 void SendMouseButtonEvent(bool down, |
38 protocol::MouseEvent::MouseButton button); | 38 protocol::MouseEvent::MouseButton button); |
| 39 void SendMouseWheelEvent(int dx, int dy); |
39 | 40 |
40 ClientContext* context_; | 41 ClientContext* context_; |
41 protocol::ConnectionToHost* connection_; | 42 protocol::ConnectionToHost* connection_; |
42 ChromotingView* view_; | 43 ChromotingView* view_; |
43 | 44 |
44 private: | 45 private: |
45 std::set<int> pressed_keys_; | 46 std::set<int> pressed_keys_; |
46 | 47 |
47 DISALLOW_COPY_AND_ASSIGN(InputHandler); | 48 DISALLOW_COPY_AND_ASSIGN(InputHandler); |
48 }; | 49 }; |
49 | 50 |
50 } // namespace remoting | 51 } // namespace remoting |
51 | 52 |
52 DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::InputHandler); | 53 DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::InputHandler); |
53 | 54 |
54 #endif // REMOTING_CLIENT_INPUT_HANDLER_H_ | 55 #endif // REMOTING_CLIENT_INPUT_HANDLER_H_ |
OLD | NEW |