Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: ppapi/proxy/resource_creation_proxy.cc

Issue 7715021: Add movement information to PPB_MouseInputEvent. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #include "ppapi/proxy/resource_creation_proxy.h" 5 #include "ppapi/proxy/resource_creation_proxy.h"
6 6
7 #include "ppapi/c/pp_errors.h" 7 #include "ppapi/c/pp_errors.h"
8 #include "ppapi/c/pp_size.h" 8 #include "ppapi/c/pp_size.h"
9 #include "ppapi/proxy/interface_id.h" 9 #include "ppapi/proxy/interface_id.h"
10 #include "ppapi/proxy/plugin_dispatcher.h" 10 #include "ppapi/proxy/plugin_dispatcher.h"
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 return PPB_InputEvent_Proxy::CreateProxyResource(instance, data); 220 return PPB_InputEvent_Proxy::CreateProxyResource(instance, data);
221 } 221 }
222 222
223 PP_Resource ResourceCreationProxy::CreateMouseInputEvent( 223 PP_Resource ResourceCreationProxy::CreateMouseInputEvent(
224 PP_Instance instance, 224 PP_Instance instance,
225 PP_InputEvent_Type type, 225 PP_InputEvent_Type type,
226 PP_TimeTicks time_stamp, 226 PP_TimeTicks time_stamp,
227 uint32_t modifiers, 227 uint32_t modifiers,
228 PP_InputEvent_MouseButton mouse_button, 228 PP_InputEvent_MouseButton mouse_button,
229 const PP_Point* mouse_position, 229 const PP_Point* mouse_position,
230 int32_t click_count) { 230 int32_t click_count,
231 const PP_Point* mouse_movement) {
231 if (type != PP_INPUTEVENT_TYPE_MOUSEDOWN && 232 if (type != PP_INPUTEVENT_TYPE_MOUSEDOWN &&
232 type != PP_INPUTEVENT_TYPE_MOUSEUP && 233 type != PP_INPUTEVENT_TYPE_MOUSEUP &&
233 type != PP_INPUTEVENT_TYPE_MOUSEMOVE && 234 type != PP_INPUTEVENT_TYPE_MOUSEMOVE &&
234 type != PP_INPUTEVENT_TYPE_MOUSEENTER && 235 type != PP_INPUTEVENT_TYPE_MOUSEENTER &&
235 type != PP_INPUTEVENT_TYPE_MOUSELEAVE) 236 type != PP_INPUTEVENT_TYPE_MOUSELEAVE)
236 return 0; 237 return 0;
237 238
238 ppapi::InputEventData data; 239 ppapi::InputEventData data;
239 data.event_type = type; 240 data.event_type = type;
240 data.event_time_stamp = time_stamp; 241 data.event_time_stamp = time_stamp;
241 data.event_modifiers = modifiers; 242 data.event_modifiers = modifiers;
242 data.mouse_button = mouse_button; 243 data.mouse_button = mouse_button;
243 data.mouse_position = *mouse_position; 244 data.mouse_position = *mouse_position;
244 data.mouse_click_count = click_count; 245 data.mouse_click_count = click_count;
246 data.mouse_movement = *mouse_movement;
245 247
246 return PPB_InputEvent_Proxy::CreateProxyResource(instance, data); 248 return PPB_InputEvent_Proxy::CreateProxyResource(instance, data);
247 } 249 }
248 250
249 PP_Resource ResourceCreationProxy::CreateGraphics3D( 251 PP_Resource ResourceCreationProxy::CreateGraphics3D(
250 PP_Instance instance, 252 PP_Instance instance,
251 PP_Resource share_context, 253 PP_Resource share_context,
252 const int32_t* attrib_list) { 254 const int32_t* attrib_list) {
253 return PPB_Graphics3D_Proxy::CreateProxyResource( 255 return PPB_Graphics3D_Proxy::CreateProxyResource(
254 instance, share_context, attrib_list); 256 instance, share_context, attrib_list);
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 *result_image_handle = dispatcher_->ShareHandleWithRemote(ih, false); 400 *result_image_handle = dispatcher_->ShareHandleWithRemote(ih, false);
399 #else 401 #else
400 *result_image_handle = ImageData::HandleFromInt(handle); 402 *result_image_handle = ImageData::HandleFromInt(handle);
401 #endif 403 #endif
402 } 404 }
403 } 405 }
404 } 406 }
405 407
406 } // namespace proxy 408 } // namespace proxy
407 } // namespace ppapi 409 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698