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 |
40 float wheel_ticks_x_; | |
Lambros
2011/10/14 21:00:25
You'll probably want these to be doubles, if you d
| |
41 float wheel_ticks_y_; | |
42 | |
44 DISALLOW_COPY_AND_ASSIGN(PepperInputHandler); | 43 DISALLOW_COPY_AND_ASSIGN(PepperInputHandler); |
45 }; | 44 }; |
46 | 45 |
47 } // namespace remoting | 46 } // namespace remoting |
48 | 47 |
49 DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::PepperInputHandler); | 48 DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::PepperInputHandler); |
50 | 49 |
51 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_INPUT_HANDLER_H_ | 50 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_INPUT_HANDLER_H_ |
OLD | NEW |