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