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 pp { | |
17 class KeyboardInputEvent; | |
18 class MouseInputEvent; | |
19 } // namespace pp | |
20 | |
21 namespace remoting { | 16 namespace remoting { |
22 | 17 |
23 class PepperViewProxy; | 18 class PepperViewProxy; |
24 | 19 |
25 class PepperInputHandler : public InputHandler { | 20 class PepperInputHandler : public InputHandler { |
26 public: | 21 public: |
27 PepperInputHandler(ClientContext* context, | 22 PepperInputHandler(ClientContext* context, |
28 protocol::ConnectionToHost* connection, | 23 protocol::ConnectionToHost* connection, |
29 PepperViewProxy* view); | 24 PepperViewProxy* view); |
30 virtual ~PepperInputHandler(); | 25 virtual ~PepperInputHandler(); |
31 | 26 |
32 virtual void Initialize(); | 27 virtual void Initialize(); |
33 | 28 |
34 void HandleKeyEvent(bool keydown, const pp::KeyboardInputEvent& event); | 29 void HandleKeyEvent(bool keydown, const pp::KeyboardInputEvent& event); |
35 void HandleCharacterEvent(const pp::KeyboardInputEvent& event); | 30 void HandleCharacterEvent(const pp::KeyboardInputEvent& event); |
36 | 31 |
37 void HandleMouseMoveEvent(const pp::MouseInputEvent& event); | 32 void HandleMouseMoveEvent(const pp::MouseInputEvent& event); |
38 void HandleMouseButtonEvent(bool button_down, | 33 void HandleMouseButtonEvent(bool button_down, |
39 const pp::MouseInputEvent& event); | 34 const pp::MouseInputEvent& event); |
| 35 void HandleMouseWheelEvent(const pp::WheelInputEvent& event); |
40 | 36 |
41 private: | 37 private: |
42 PepperViewProxy* pepper_view_; | 38 PepperViewProxy* pepper_view_; |
43 | 39 |
44 DISALLOW_COPY_AND_ASSIGN(PepperInputHandler); | 40 DISALLOW_COPY_AND_ASSIGN(PepperInputHandler); |
45 }; | 41 }; |
46 | 42 |
47 } // namespace remoting | 43 } // namespace remoting |
48 | 44 |
49 DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::PepperInputHandler); | 45 DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::PepperInputHandler); |
50 | 46 |
51 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_INPUT_HANDLER_H_ | 47 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_INPUT_HANDLER_H_ |
OLD | NEW |