Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 struct PP_InputEvent_Character; | 10 struct PP_InputEvent_Character; |
| 11 struct PP_InputEvent_Key; | 11 struct PP_InputEvent_Key; |
| 12 struct PP_InputEvent_Mouse; | 12 struct PP_InputEvent_Mouse; |
| 13 | 13 |
| 14 namespace pp { | |
| 15 | |
|
Sergey Ulanov
2011/07/20 17:41:50
nit: don't need this empty line
| |
| 16 class KeyboardInputEvent; | |
| 17 class MouseInputEvent; | |
| 18 | |
|
Sergey Ulanov
2011/07/20 17:41:50
nit: don't need this empty line
| |
| 19 } // namespace pp | |
| 20 | |
| 14 namespace remoting { | 21 namespace remoting { |
| 15 | 22 |
| 16 class PepperInputHandler : public InputHandler { | 23 class PepperInputHandler : public InputHandler { |
| 17 public: | 24 public: |
| 18 PepperInputHandler(ClientContext* context, | 25 PepperInputHandler(ClientContext* context, |
| 19 protocol::ConnectionToHost* connection, | 26 protocol::ConnectionToHost* connection, |
| 20 ChromotingView* view); | 27 ChromotingView* view); |
| 21 virtual ~PepperInputHandler(); | 28 virtual ~PepperInputHandler(); |
| 22 | 29 |
| 23 virtual void Initialize(); | 30 virtual void Initialize(); |
| 24 | 31 |
| 25 void HandleKeyEvent(bool keydown, const PP_InputEvent_Key& event); | 32 void HandleKeyEvent(bool keydown, const pp::KeyboardInputEvent& event); |
| 26 void HandleCharacterEvent(const PP_InputEvent_Character& event); | 33 void HandleCharacterEvent(const pp::KeyboardInputEvent& event); |
| 27 | 34 |
| 28 void HandleMouseMoveEvent(const PP_InputEvent_Mouse& event); | 35 void HandleMouseMoveEvent(const pp::MouseInputEvent& event); |
| 29 void HandleMouseButtonEvent(bool button_down, | 36 void HandleMouseButtonEvent(bool button_down, |
| 30 const PP_InputEvent_Mouse& event); | 37 const pp::MouseInputEvent& event); |
| 31 | 38 |
| 32 private: | 39 private: |
| 33 DISALLOW_COPY_AND_ASSIGN(PepperInputHandler); | 40 DISALLOW_COPY_AND_ASSIGN(PepperInputHandler); |
| 34 }; | 41 }; |
| 35 | 42 |
| 36 } // namespace remoting | 43 } // namespace remoting |
| 37 | 44 |
| 38 DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::PepperInputHandler); | 45 DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::PepperInputHandler); |
| 39 | 46 |
| 40 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_INPUT_HANDLER_H_ | 47 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_INPUT_HANDLER_H_ |
| OLD | NEW |