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

Side by Side Diff: ppapi/thunk/ppb_input_event_thunk.cc

Issue 10634017: ppapi: Add ResourceCreationAPI::CreateTouchInputEvent for creating touch-events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 | « ppapi/shared_impl/ppb_input_event_shared.cc ('k') | ppapi/thunk/resource_creation_api.h » ('j') | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/c/pp_errors.h" 5 #include "ppapi/c/pp_errors.h"
6 #include "ppapi/thunk/enter.h" 6 #include "ppapi/thunk/enter.h"
7 #include "ppapi/thunk/ppb_input_event_api.h" 7 #include "ppapi/thunk/ppb_input_event_api.h"
8 #include "ppapi/thunk/ppb_instance_api.h" 8 #include "ppapi/thunk/ppb_instance_api.h"
9 #include "ppapi/thunk/resource_creation_api.h" 9 #include "ppapi/thunk/resource_creation_api.h"
10 #include "ppapi/thunk/thunk.h" 10 #include "ppapi/thunk/thunk.h"
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 381
382 // Touch ----------------------------------------------------------------------- 382 // Touch -----------------------------------------------------------------------
383 383
384 PP_Resource CreateTouchInputEvent(PP_Instance instance, 384 PP_Resource CreateTouchInputEvent(PP_Instance instance,
385 PP_InputEvent_Type type, 385 PP_InputEvent_Type type,
386 PP_TimeTicks time_stamp, 386 PP_TimeTicks time_stamp,
387 uint32_t modifiers) { 387 uint32_t modifiers) {
388 EnterResourceCreation enter(instance); 388 EnterResourceCreation enter(instance);
389 if (enter.failed()) 389 if (enter.failed())
390 return 0; 390 return 0;
391 // TODO(sad): 391 return enter.functions()->CreateTouchInputEvent(instance, type, time_stamp,
392 return 0; 392 modifiers);
393 } 393 }
394 394
395 void AddTouchPoint(PP_Resource touch_event, 395 void AddTouchPoint(PP_Resource touch_event,
396 PP_TouchListType list, 396 PP_TouchListType list,
397 const PP_TouchPoint* point) { 397 const PP_TouchPoint* point) {
398 EnterInputEvent enter(touch_event, true); 398 EnterInputEvent enter(touch_event, true);
399 if (enter.failed()) 399 if (enter.failed())
400 return; 400 return;
401 return enter.object()->AddTouchPoint(list, *point); 401 return enter.object()->AddTouchPoint(list, *point);
402 } 402 }
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 const PPB_IMEInputEvent_Dev_0_2* GetPPB_IMEInputEvent_Dev_0_2_Thunk() { 479 const PPB_IMEInputEvent_Dev_0_2* GetPPB_IMEInputEvent_Dev_0_2_Thunk() {
480 return &g_ppb_ime_input_event_0_2_thunk; 480 return &g_ppb_ime_input_event_0_2_thunk;
481 } 481 }
482 482
483 const PPB_TouchInputEvent_1_0* GetPPB_TouchInputEvent_Thunk() { 483 const PPB_TouchInputEvent_1_0* GetPPB_TouchInputEvent_Thunk() {
484 return &g_ppb_touch_input_event_thunk; 484 return &g_ppb_touch_input_event_thunk;
485 } 485 }
486 486
487 } // namespace thunk 487 } // namespace thunk
488 } // namespace ppapi 488 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/shared_impl/ppb_input_event_shared.cc ('k') | ppapi/thunk/resource_creation_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698