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

Side by Side Diff: ppapi/c/dev/ppb_testing_dev.h

Issue 8413021: Add functions to generate input events to PPB_Testing_Dev. These make (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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 | « no previous file | ppapi/proxy/ppapi_messages.h » ('j') | ppapi/proxy/ppapi_messages.h » ('J')
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 #ifndef PPAPI_C_DEV_PPB_TESTING_DEV_H_ 5 #ifndef PPAPI_C_DEV_PPB_TESTING_DEV_H_
6 #define PPAPI_C_DEV_PPB_TESTING_DEV_H_ 6 #define PPAPI_C_DEV_PPB_TESTING_DEV_H_
7 7
8 #include "ppapi/c/pp_bool.h" 8 #include "ppapi/c/pp_bool.h"
9 #include "ppapi/c/pp_instance.h" 9 #include "ppapi/c/pp_instance.h"
10 #include "ppapi/c/pp_input_event.h"
10 #include "ppapi/c/pp_resource.h" 11 #include "ppapi/c/pp_resource.h"
11 #include "ppapi/c/pp_stdint.h" 12 #include "ppapi/c/pp_stdint.h"
12 13
13 struct PP_Point; 14 struct PP_Point;
14 15
15 // TODO(dmichael): Delete support for 0.6. 16 // TODO(dmichael): Delete support for 0.6.
16 #define PPB_TESTING_DEV_INTERFACE_0_6 "PPB_Testing(Dev);0.6" 17 #define PPB_TESTING_DEV_INTERFACE_0_6 "PPB_Testing(Dev);0.6"
dmichael (off chromium) 2011/10/28 16:02:22 optional: It would be nice if you could get rid of
17 #define PPB_TESTING_DEV_INTERFACE_0_7 "PPB_Testing(Dev);0.7" 18 #define PPB_TESTING_DEV_INTERFACE_0_7 "PPB_Testing(Dev);0.7"
18 #define PPB_TESTING_DEV_INTERFACE PPB_TESTING_DEV_INTERFACE_0_7 19 #define PPB_TESTING_DEV_INTERFACE_0_8 "PPB_Testing(Dev);0.8"
20 #define PPB_TESTING_DEV_INTERFACE PPB_TESTING_DEV_INTERFACE_0_8
19 21
20 // This interface contains functions used for unit testing. Do not use in 22 // This interface contains functions used for unit testing. Do not use in
21 // production code. They are not guaranteed to be available in normal plugin 23 // production code. They are not guaranteed to be available in normal plugin
22 // environments so you should not depend on them. 24 // environments so you should not depend on them.
23 struct PPB_Testing_Dev { 25 struct PPB_Testing_Dev {
24 // Reads the bitmap data out of the backing store for the given 26 // Reads the bitmap data out of the backing store for the given
25 // DeviceContext2D and into the given image. If the data was successfully 27 // DeviceContext2D and into the given image. If the data was successfully
26 // read, it will return PP_TRUE. 28 // read, it will return PP_TRUE.
27 // 29 //
28 // This function should not generally be necessary for normal plugin 30 // This function should not generally be necessary for normal plugin
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 void (*QuitMessageLoop)(PP_Instance instance); 69 void (*QuitMessageLoop)(PP_Instance instance);
68 70
69 // Returns the number of live objects (resources + strings + objects) 71 // Returns the number of live objects (resources + strings + objects)
70 // associated with this plugin instance. Used for detecting leaks. Returns 72 // associated with this plugin instance. Used for detecting leaks. Returns
71 // (uint32_t)-1 on failure. 73 // (uint32_t)-1 on failure.
72 uint32_t (*GetLiveObjectsForInstance)(PP_Instance instance); 74 uint32_t (*GetLiveObjectsForInstance)(PP_Instance instance);
73 75
74 // Returns PP_TRUE if the plugin is running out-of-process, PP_FALSE 76 // Returns PP_TRUE if the plugin is running out-of-process, PP_FALSE
75 // otherwise. 77 // otherwise.
76 PP_Bool (*IsOutOfProcess)(); 78 PP_Bool (*IsOutOfProcess)();
79
80 // Generates a key up / down input event.
dmichael (off chromium) 2011/10/28 16:02:22 When you say 'Generate', you mean inject one so th
81 void (*GenerateKeyEvent)(
82 PP_Instance instance,
83 PP_InputEvent_Type type,
84 const PP_InputEvent_Key& key_event);
dmichael (off chromium) 2011/10/28 16:02:22 Can you instead use 1 function that takes a PP_Res
85
86 // Generates a character input event.
87 void (*GenerateCharacterEvent)(
88 PP_Instance instance,
89 const PP_InputEvent_Character& character_event);
90
91 // Generates a mouse input event.
92 void (*GenerateMouseEvent)(
93 PP_Instance instance,
94 PP_InputEvent_Type type,
95 const PP_InputEvent_Mouse& mouse_event);
96
97 // Generates a mouse wheel input event.
98 void (*GenerateWheelEvent)(
99 PP_Instance instance,
100 const PP_InputEvent_Wheel& wheel_event);
77 }; 101 };
78 102
79 #endif /* PPAPI_C_DEV_PPB_TESTING_DEV_H_ */ 103 #endif /* PPAPI_C_DEV_PPB_TESTING_DEV_H_ */
80 104
OLDNEW
« no previous file with comments | « no previous file | ppapi/proxy/ppapi_messages.h » ('j') | ppapi/proxy/ppapi_messages.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698