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_PLUGIN_PEPPER_INPUT_HANDLER_H_ | 5 #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_INPUT_HANDLER_H_ |
6 #define REMOTING_CLIENT_PLUGIN_PEPPER_INPUT_HANDLER_H_ | 6 #define REMOTING_CLIENT_PLUGIN_PEPPER_INPUT_HANDLER_H_ |
7 | 7 |
8 #include "remoting/client/input_handler.h" | 8 #include "remoting/client/input_handler.h" |
9 | 9 |
10 namespace pp { | 10 namespace pp { |
11 class KeyboardInputEvent; | 11 class KeyboardInputEvent; |
12 class MouseInputEvent; | 12 class MouseInputEvent; |
13 class WheelInputEvent; | 13 class WheelInputEvent; |
14 } | 14 } |
15 | 15 |
16 namespace remoting { | 16 namespace remoting { |
17 | 17 |
18 class PepperViewProxy; | 18 class PepperViewProxy; |
19 | 19 |
20 class PepperInputHandler : public InputHandler { | 20 class PepperInputHandler : public InputHandler { |
21 public: | 21 public: |
22 PepperInputHandler(ClientContext* context, | 22 PepperInputHandler(ClientContext* context, |
23 protocol::ConnectionToHost* connection, | 23 protocol::ConnectionToHost* connection, |
24 PepperViewProxy* view); | 24 PepperViewProxy* view); |
25 virtual ~PepperInputHandler(); | 25 virtual ~PepperInputHandler(); |
26 | 26 |
27 virtual void Initialize(); | 27 virtual void Initialize() OVERRIDE; |
28 | 28 |
29 void HandleKeyEvent(bool keydown, const pp::KeyboardInputEvent& event); | 29 void HandleKeyEvent(bool keydown, const pp::KeyboardInputEvent& event); |
30 void HandleCharacterEvent(const pp::KeyboardInputEvent& event); | 30 void HandleCharacterEvent(const pp::KeyboardInputEvent& event); |
31 | 31 |
32 void HandleMouseMoveEvent(const pp::MouseInputEvent& event); | 32 void HandleMouseMoveEvent(const pp::MouseInputEvent& event); |
33 void HandleMouseButtonEvent(bool button_down, | 33 void HandleMouseButtonEvent(bool button_down, |
34 const pp::MouseInputEvent& event); | 34 const pp::MouseInputEvent& event); |
35 void HandleMouseWheelEvent(const pp::WheelInputEvent& event); | 35 void HandleMouseWheelEvent(const pp::WheelInputEvent& event); |
36 | 36 |
37 private: | 37 private: |
38 PepperViewProxy* pepper_view_; | 38 PepperViewProxy* pepper_view_; |
39 | 39 |
40 float wheel_ticks_x_; | 40 float wheel_ticks_x_; |
41 float wheel_ticks_y_; | 41 float wheel_ticks_y_; |
42 | 42 |
43 DISALLOW_COPY_AND_ASSIGN(PepperInputHandler); | 43 DISALLOW_COPY_AND_ASSIGN(PepperInputHandler); |
44 }; | 44 }; |
45 | 45 |
46 } // namespace remoting | 46 } // namespace remoting |
47 | 47 |
48 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_INPUT_HANDLER_H_ | 48 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_INPUT_HANDLER_H_ |
OLD | NEW |