diff options
author | yzshen@chromium.org <yzshen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-31 17:15:18 +0000 |
---|---|---|
committer | yzshen@chromium.org <yzshen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-31 17:15:18 +0000 |
commit | 8047326498cbb57b90940d7375eb1e834e90fe4c (patch) | |
tree | 70c367c8e0905218c1c9c3a6fb0481d6f521d646 /webkit | |
parent | bca6d271896444890973db203a9f153e188ddae9 (diff) | |
download | chromium_src-8047326498cbb57b90940d7375eb1e834e90fe4c.zip chromium_src-8047326498cbb57b90940d7375eb1e834e90fe4c.tar.gz chromium_src-8047326498cbb57b90940d7375eb1e834e90fe4c.tar.bz2 |
Add movement information to PPB_MouseInputEvent.
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/7715021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98994 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/plugins/ppapi/event_conversion.cc | 9 | ||||
-rw-r--r-- | webkit/plugins/ppapi/plugin_module.cc | 4 | ||||
-rw-r--r-- | webkit/plugins/ppapi/resource_creation_impl.cc | 4 | ||||
-rw-r--r-- | webkit/plugins/ppapi/resource_creation_impl.h | 3 |
4 files changed, 17 insertions, 3 deletions
diff --git a/webkit/plugins/ppapi/event_conversion.cc b/webkit/plugins/ppapi/event_conversion.cc index eb051da..1c4ac3a 100644 --- a/webkit/plugins/ppapi/event_conversion.cc +++ b/webkit/plugins/ppapi/event_conversion.cc @@ -135,6 +135,10 @@ void AppendMouseEvent(const WebInputEvent& event, result.mouse_position.x = mouse_event.x; result.mouse_position.y = mouse_event.y; result.mouse_click_count = mouse_event.clickCount; + + // TODO(yzshen): Make the change after WebMouseEvent adds movementX/Y. + result.mouse_movement.x = 0; // mouse_event.movementX + result.mouse_movement.y = 0; // mouse_event.movementY result_events->push_back(result); } @@ -225,6 +229,11 @@ WebMouseEvent* BuildMouseEvent(const InputEventData& event) { mouse_event->x = event.mouse_position.x; mouse_event->y = event.mouse_position.y; mouse_event->clickCount = event.mouse_click_count; + + // TODO(yzshen): Uncomment the following lines after WebMouseEvent adds + // movementX/Y. + // mouse_event->movementX = event.mouse_position.x; + // mouse_event->movementY = event.mouse_position.y; return mouse_event; } diff --git a/webkit/plugins/ppapi/plugin_module.cc b/webkit/plugins/ppapi/plugin_module.cc index 9859157..cabf970 100644 --- a/webkit/plugins/ppapi/plugin_module.cc +++ b/webkit/plugins/ppapi/plugin_module.cc @@ -298,7 +298,9 @@ const void* GetInterface(const char* name) { if (strcmp(name, PPB_MESSAGING_INTERFACE_1_0) == 0) return ::ppapi::thunk::GetPPB_Messaging_Thunk(); if (strcmp(name, PPB_MOUSE_INPUT_EVENT_INTERFACE_1_0) == 0) - return ::ppapi::thunk::GetPPB_MouseInputEvent_Thunk(); + return ::ppapi::thunk::GetPPB_MouseInputEvent_1_0_Thunk(); + if (strcmp(name, PPB_MOUSE_INPUT_EVENT_INTERFACE_1_1) == 0) + return ::ppapi::thunk::GetPPB_MouseInputEvent_1_1_Thunk(); if (strcmp(name, PPB_PROXY_PRIVATE_INTERFACE) == 0) return PPB_Proxy_Impl::GetInterface(); if (strcmp(name, PPB_QUERY_POLICY_DEV_INTERFACE_0_1) == 0) diff --git a/webkit/plugins/ppapi/resource_creation_impl.cc b/webkit/plugins/ppapi/resource_creation_impl.cc index 05f09cc..23b725b 100644 --- a/webkit/plugins/ppapi/resource_creation_impl.cc +++ b/webkit/plugins/ppapi/resource_creation_impl.cc @@ -215,7 +215,8 @@ PP_Resource ResourceCreationImpl::CreateMouseInputEvent( uint32_t modifiers, PP_InputEvent_MouseButton mouse_button, const PP_Point* mouse_position, - int32_t click_count) { + int32_t click_count, + const PP_Point* mouse_movement) { if (type != PP_INPUTEVENT_TYPE_MOUSEDOWN && type != PP_INPUTEVENT_TYPE_MOUSEUP && type != PP_INPUTEVENT_TYPE_MOUSEMOVE && @@ -230,6 +231,7 @@ PP_Resource ResourceCreationImpl::CreateMouseInputEvent( data.mouse_button = mouse_button; data.mouse_position = *mouse_position; data.mouse_click_count = click_count; + data.mouse_movement = *mouse_movement; return (new InputEventImpl(InputEventImpl::InitAsImpl(), instance, data))->GetReference(); diff --git a/webkit/plugins/ppapi/resource_creation_impl.h b/webkit/plugins/ppapi/resource_creation_impl.h index 211f1cd..6e0129f 100644 --- a/webkit/plugins/ppapi/resource_creation_impl.h +++ b/webkit/plugins/ppapi/resource_creation_impl.h @@ -88,7 +88,8 @@ class ResourceCreationImpl : public ::ppapi::FunctionGroupBase, uint32_t modifiers, PP_InputEvent_MouseButton mouse_button, const PP_Point* mouse_position, - int32_t click_count) OVERRIDE; + int32_t click_count, + const PP_Point* mouse_movement) OVERRIDE; virtual PP_Resource CreateScrollbar(PP_Instance instance, PP_Bool vertical) OVERRIDE; virtual PP_Resource CreateSurface3D(PP_Instance instance, |