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

Side by Side Diff: webkit/plugins/ppapi/resource_creation_impl.cc

Issue 7715021: Add movement information to PPB_MouseInputEvent. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 3 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
« no previous file with comments | « webkit/plugins/ppapi/resource_creation_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "webkit/plugins/ppapi/resource_creation_impl.h" 5 #include "webkit/plugins/ppapi/resource_creation_impl.h"
6 6
7 #include "ppapi/c/pp_size.h" 7 #include "ppapi/c/pp_size.h"
8 #include "ppapi/shared_impl/audio_config_impl.h" 8 #include "ppapi/shared_impl/audio_config_impl.h"
9 #include "ppapi/shared_impl/input_event_impl.h" 9 #include "ppapi/shared_impl/input_event_impl.h"
10 #include "ppapi/shared_impl/var.h" 10 #include "ppapi/shared_impl/var.h"
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 instance, data))->GetReference(); 208 instance, data))->GetReference();
209 } 209 }
210 210
211 PP_Resource ResourceCreationImpl::CreateMouseInputEvent( 211 PP_Resource ResourceCreationImpl::CreateMouseInputEvent(
212 PP_Instance instance, 212 PP_Instance instance,
213 PP_InputEvent_Type type, 213 PP_InputEvent_Type type,
214 PP_TimeTicks time_stamp, 214 PP_TimeTicks time_stamp,
215 uint32_t modifiers, 215 uint32_t modifiers,
216 PP_InputEvent_MouseButton mouse_button, 216 PP_InputEvent_MouseButton mouse_button,
217 const PP_Point* mouse_position, 217 const PP_Point* mouse_position,
218 int32_t click_count) { 218 int32_t click_count,
219 const PP_Point* mouse_movement) {
219 if (type != PP_INPUTEVENT_TYPE_MOUSEDOWN && 220 if (type != PP_INPUTEVENT_TYPE_MOUSEDOWN &&
220 type != PP_INPUTEVENT_TYPE_MOUSEUP && 221 type != PP_INPUTEVENT_TYPE_MOUSEUP &&
221 type != PP_INPUTEVENT_TYPE_MOUSEMOVE && 222 type != PP_INPUTEVENT_TYPE_MOUSEMOVE &&
222 type != PP_INPUTEVENT_TYPE_MOUSEENTER && 223 type != PP_INPUTEVENT_TYPE_MOUSEENTER &&
223 type != PP_INPUTEVENT_TYPE_MOUSELEAVE) 224 type != PP_INPUTEVENT_TYPE_MOUSELEAVE)
224 return 0; 225 return 0;
225 226
226 InputEventData data; 227 InputEventData data;
227 data.event_type = type; 228 data.event_type = type;
228 data.event_time_stamp = time_stamp; 229 data.event_time_stamp = time_stamp;
229 data.event_modifiers = modifiers; 230 data.event_modifiers = modifiers;
230 data.mouse_button = mouse_button; 231 data.mouse_button = mouse_button;
231 data.mouse_position = *mouse_position; 232 data.mouse_position = *mouse_position;
232 data.mouse_click_count = click_count; 233 data.mouse_click_count = click_count;
234 data.mouse_movement = *mouse_movement;
233 235
234 return (new InputEventImpl(InputEventImpl::InitAsImpl(), 236 return (new InputEventImpl(InputEventImpl::InitAsImpl(),
235 instance, data))->GetReference(); 237 instance, data))->GetReference();
236 } 238 }
237 239
238 PP_Resource ResourceCreationImpl::CreateScrollbar(PP_Instance instance, 240 PP_Resource ResourceCreationImpl::CreateScrollbar(PP_Instance instance,
239 PP_Bool vertical) { 241 PP_Bool vertical) {
240 return PPB_Scrollbar_Impl::Create(instance, PP_ToBool(vertical)); 242 return PPB_Scrollbar_Impl::Create(instance, PP_ToBool(vertical));
241 } 243 }
242 244
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 data.wheel_delta = *wheel_delta; 299 data.wheel_delta = *wheel_delta;
298 data.wheel_ticks = *wheel_ticks; 300 data.wheel_ticks = *wheel_ticks;
299 data.wheel_scroll_by_page = PP_ToBool(scroll_by_page); 301 data.wheel_scroll_by_page = PP_ToBool(scroll_by_page);
300 302
301 return (new InputEventImpl(InputEventImpl::InitAsImpl(), 303 return (new InputEventImpl(InputEventImpl::InitAsImpl(),
302 instance, data))->GetReference(); 304 instance, data))->GetReference();
303 } 305 }
304 306
305 } // namespace ppapi 307 } // namespace ppapi
306 } // namespace webkit 308 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/resource_creation_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698