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