OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PROTOCOL_INPUT_EVENT_TRACKER_H_ | 5 #ifndef REMOTING_PROTOCOL_INPUT_EVENT_TRACKER_H_ |
6 #define REMOTING_PROTOCOL_INPUT_EVENT_TRACKER_H_ | 6 #define REMOTING_PROTOCOL_INPUT_EVENT_TRACKER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 bool IsKeyPressed(uint32 usb_keycode) const; | 27 bool IsKeyPressed(uint32 usb_keycode) const; |
28 | 28 |
29 // Returns the count of keys currently pressed. | 29 // Returns the count of keys currently pressed. |
30 int PressedKeyCount() const; | 30 int PressedKeyCount() const; |
31 | 31 |
32 // Dispatch release events for all currently-pressed keys and mouse buttons | 32 // Dispatch release events for all currently-pressed keys and mouse buttons |
33 // to the InputStub. | 33 // to the InputStub. |
34 void ReleaseAll(); | 34 void ReleaseAll(); |
35 | 35 |
36 // InputStub interface. | 36 // InputStub interface. |
37 virtual void InjectKeyEvent(const KeyEvent& event) OVERRIDE; | 37 virtual void InjectKeyEvent(const KeyEvent& event) override; |
38 virtual void InjectTextEvent(const TextEvent& event) OVERRIDE; | 38 virtual void InjectTextEvent(const TextEvent& event) override; |
39 virtual void InjectMouseEvent(const MouseEvent& event) OVERRIDE; | 39 virtual void InjectMouseEvent(const MouseEvent& event) override; |
40 | 40 |
41 private: | 41 private: |
42 protocol::InputStub* input_stub_; | 42 protocol::InputStub* input_stub_; |
43 | 43 |
44 std::set<uint32> pressed_keys_; | 44 std::set<uint32> pressed_keys_; |
45 | 45 |
46 webrtc::DesktopVector mouse_pos_; | 46 webrtc::DesktopVector mouse_pos_; |
47 uint32 mouse_button_state_; | 47 uint32 mouse_button_state_; |
48 | 48 |
49 DISALLOW_COPY_AND_ASSIGN(InputEventTracker); | 49 DISALLOW_COPY_AND_ASSIGN(InputEventTracker); |
50 }; | 50 }; |
51 | 51 |
52 } // namespace protocol | 52 } // namespace protocol |
53 } // namespace remoting | 53 } // namespace remoting |
54 | 54 |
55 #endif // REMOTING_PROTOCOL_INPUT_EVENT_TRACKER_H_ | 55 #endif // REMOTING_PROTOCOL_INPUT_EVENT_TRACKER_H_ |
OLD | NEW |