diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-23 04:41:59 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-23 04:41:59 +0000 |
commit | 9d2951f6037aafcdae278d117b54027421937bac (patch) | |
tree | 94379892691f2cce5f9716962971fc489d417c3d /remoting/client/plugin/pepper_input_handler.cc | |
parent | b7c2e29503c528f053cd8659e1fbe3cbff427e86 (diff) | |
download | chromium_src-9d2951f6037aafcdae278d117b54027421937bac.zip chromium_src-9d2951f6037aafcdae278d117b54027421937bac.tar.gz chromium_src-9d2951f6037aafcdae278d117b54027421937bac.tar.bz2 |
Pull latest PPAPI. Change key handling to support the new API.
TEST=PPAPI UI tests
BUG=none
Review URL: http://codereview.chromium.org/3386019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60258 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/client/plugin/pepper_input_handler.cc')
-rw-r--r-- | remoting/client/plugin/pepper_input_handler.cc | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/remoting/client/plugin/pepper_input_handler.cc b/remoting/client/plugin/pepper_input_handler.cc index 2ba1603..c5677bd 100644 --- a/remoting/client/plugin/pepper_input_handler.cc +++ b/remoting/client/plugin/pepper_input_handler.cc @@ -4,6 +4,8 @@ #include "remoting/client/plugin/pepper_input_handler.h" +#include "third_party/ppapi/c/pp_input_event.h" + namespace remoting { PepperInputHandler::PepperInputHandler(ClientContext* context, @@ -19,27 +21,28 @@ void PepperInputHandler::Initialize() { } void PepperInputHandler::HandleKeyEvent(bool keydown, - const PP_Event_Key& event) { - SendKeyEvent(keydown, event.normalizedKeyCode); + const PP_InputEvent_Key& event) { + SendKeyEvent(keydown, event.key_code); } -void PepperInputHandler::HandleCharacterEvent(const PP_Event_Character& event) { +void PepperInputHandler::HandleCharacterEvent(const PP_InputEvent_Character& event) { // TODO(garykac): Coordinate key and char events. } -void PepperInputHandler::HandleMouseMoveEvent(const PP_Event_Mouse& event) { +void PepperInputHandler::HandleMouseMoveEvent(const PP_InputEvent_Mouse& event) { SendMouseMoveEvent(static_cast<int>(event.x), static_cast<int>(event.y)); } -void PepperInputHandler::HandleMouseButtonEvent(bool button_down, - const PP_Event_Mouse& event) { +void PepperInputHandler::HandleMouseButtonEvent( + bool button_down, + const PP_InputEvent_Mouse& event) { MouseButton button = MouseButtonUndefined; - if (event.button == PP_EVENT_MOUSEBUTTON_LEFT) { + if (event.button == PP_INPUTEVENT_MOUSEBUTTON_LEFT) { button = MouseButtonLeft; - } else if (event.button == PP_EVENT_MOUSEBUTTON_MIDDLE) { + } else if (event.button == PP_INPUTEVENT_MOUSEBUTTON_MIDDLE) { button = MouseButtonMiddle; - } else if (event.button == PP_EVENT_MOUSEBUTTON_RIGHT) { + } else if (event.button == PP_INPUTEVENT_MOUSEBUTTON_RIGHT) { button = MouseButtonRight; } |