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

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

Issue 9113044: Convert to new enter method (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: PATCH DESCRIPTIONS ARE A STUPID WASTE OF TIME Created 8 years, 10 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/thunk/ppb_image_data_trusted_thunk.cc ('k') | ppapi/thunk/ppb_layer_compositor_thunk.cc » ('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/thunk.h" 6 #include "ppapi/thunk/thunk.h"
7 #include "ppapi/thunk/enter.h" 7 #include "ppapi/thunk/enter.h"
8 #include "ppapi/thunk/ppb_input_event_api.h" 8 #include "ppapi/thunk/ppb_input_event_api.h"
9 #include "ppapi/thunk/ppb_instance_api.h" 9 #include "ppapi/thunk/ppb_instance_api.h"
10 #include "ppapi/thunk/resource_creation_api.h" 10 #include "ppapi/thunk/resource_creation_api.h"
11 11
12 namespace ppapi { 12 namespace ppapi {
13 namespace thunk { 13 namespace thunk {
14 14
15 namespace { 15 namespace {
16 16
17 typedef EnterFunction<PPB_Instance_FunctionAPI> EnterInstance; 17 typedef EnterFunction<PPB_Instance_FunctionAPI> EnterInstance;
18 typedef EnterResource<PPB_InputEvent_API> EnterInputEvent; 18 typedef EnterResource<PPB_InputEvent_API> EnterInputEvent;
19 19
20 // InputEvent ------------------------------------------------------------------ 20 // InputEvent ------------------------------------------------------------------
21 21
22 int32_t RequestInputEvents(PP_Instance instance, uint32_t event_classes) { 22 int32_t RequestInputEvents(PP_Instance instance, uint32_t event_classes) {
23 EnterInstance enter(instance, true); 23 EnterInstance enter(instance, true);
24 if (enter.failed()) 24 if (enter.failed())
25 return PP_ERROR_BADARGUMENT; 25 return enter.retval();
26 return enter.functions()->RequestInputEvents(instance, event_classes); 26 return enter.functions()->RequestInputEvents(instance, event_classes);
27 } 27 }
28 28
29 int32_t RequestFilteringInputEvents(PP_Instance instance, 29 int32_t RequestFilteringInputEvents(PP_Instance instance,
30 uint32_t event_classes) { 30 uint32_t event_classes) {
31 EnterInstance enter(instance, true); 31 EnterInstance enter(instance, true);
32 if (enter.failed()) 32 if (enter.failed())
33 return PP_ERROR_BADARGUMENT; 33 return enter.retval();
34 return enter.functions()->RequestFilteringInputEvents(instance, 34 return enter.functions()->RequestFilteringInputEvents(instance,
35 event_classes); 35 event_classes);
36 } 36 }
37 37
38 void ClearInputEventRequest(PP_Instance instance, 38 void ClearInputEventRequest(PP_Instance instance,
39 uint32_t event_classes) { 39 uint32_t event_classes) {
40 EnterInstance enter(instance, true); 40 EnterInstance enter(instance, true);
41 if (enter.succeeded()) 41 if (enter.succeeded())
42 enter.functions()->ClearInputEventRequest(instance, event_classes); 42 enter.functions()->ClearInputEventRequest(instance, event_classes);
43 } 43 }
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 const PPB_WheelInputEvent_1_0* GetPPB_WheelInputEvent_1_0_Thunk() { 350 const PPB_WheelInputEvent_1_0* GetPPB_WheelInputEvent_1_0_Thunk() {
351 return &g_ppb_wheel_input_event_thunk; 351 return &g_ppb_wheel_input_event_thunk;
352 } 352 }
353 353
354 const PPB_IMEInputEvent_Dev_0_1* GetPPB_IMEInputEvent_Dev_0_1_Thunk() { 354 const PPB_IMEInputEvent_Dev_0_1* GetPPB_IMEInputEvent_Dev_0_1_Thunk() {
355 return &g_ppb_ime_input_event_thunk; 355 return &g_ppb_ime_input_event_thunk;
356 } 356 }
357 357
358 } // namespace thunk 358 } // namespace thunk
359 } // namespace ppapi 359 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/thunk/ppb_image_data_trusted_thunk.cc ('k') | ppapi/thunk/ppb_layer_compositor_thunk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698