OLD | NEW |
---|---|
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_resource.h" | 10 #include "ppapi/c/pp_resource.h" |
11 #include "ppapi/c/pp_stdint.h" | 11 #include "ppapi/c/pp_stdint.h" |
12 | 12 |
13 struct PP_Point; | 13 struct PP_Point; |
14 | 14 |
15 // 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_7 "PPB_Testing(Dev);0.7" | 15 #define PPB_TESTING_DEV_INTERFACE_0_7 "PPB_Testing(Dev);0.7" |
18 #define PPB_TESTING_DEV_INTERFACE PPB_TESTING_DEV_INTERFACE_0_7 | 16 #define PPB_TESTING_DEV_INTERFACE PPB_TESTING_DEV_INTERFACE_0_7 |
dmichael (off chromium)
2011/11/07 17:12:58
I think in general we still need to rev the interf
bbudge
2011/11/08 00:05:05
Done.
| |
19 | 17 |
20 // This interface contains functions used for unit testing. Do not use in | 18 // 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 | 19 // production code. They are not guaranteed to be available in normal plugin |
22 // environments so you should not depend on them. | 20 // environments so you should not depend on them. |
23 struct PPB_Testing_Dev { | 21 struct PPB_Testing_Dev { |
24 // Reads the bitmap data out of the backing store for the given | 22 // Reads the bitmap data out of the backing store for the given |
25 // DeviceContext2D and into the given image. If the data was successfully | 23 // DeviceContext2D and into the given image. If the data was successfully |
26 // read, it will return PP_TRUE. | 24 // read, it will return PP_TRUE. |
27 // | 25 // |
28 // This function should not generally be necessary for normal plugin | 26 // This function should not generally be necessary for normal plugin |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
67 void (*QuitMessageLoop)(PP_Instance instance); | 65 void (*QuitMessageLoop)(PP_Instance instance); |
68 | 66 |
69 // Returns the number of live objects (resources + strings + objects) | 67 // Returns the number of live objects (resources + strings + objects) |
70 // associated with this plugin instance. Used for detecting leaks. Returns | 68 // associated with this plugin instance. Used for detecting leaks. Returns |
71 // (uint32_t)-1 on failure. | 69 // (uint32_t)-1 on failure. |
72 uint32_t (*GetLiveObjectsForInstance)(PP_Instance instance); | 70 uint32_t (*GetLiveObjectsForInstance)(PP_Instance instance); |
73 | 71 |
74 // Returns PP_TRUE if the plugin is running out-of-process, PP_FALSE | 72 // Returns PP_TRUE if the plugin is running out-of-process, PP_FALSE |
75 // otherwise. | 73 // otherwise. |
76 PP_Bool (*IsOutOfProcess)(); | 74 PP_Bool (*IsOutOfProcess)(); |
75 | |
76 // Passes the input event to the renderer, which sends it back to the | |
77 // plugin. The plugin should implement PPP_InputEvent and register for | |
78 // the input event type. | |
79 // | |
80 // Note that this method doesn't send the event through the entire renderer | |
81 // layer, since this can cause the plugin to receive other events that may | |
82 // be generated there. This is intended to give the plugin the ability to | |
83 // simulate an exact sequence of events, and to generate a "user gesture" | |
84 // in order to test functionality that requires one. | |
85 void (*SimulateInputEvent)(PP_Instance instance, PP_Resource input_event); | |
77 }; | 86 }; |
78 | 87 |
79 #endif /* PPAPI_C_DEV_PPB_TESTING_DEV_H_ */ | 88 #endif /* PPAPI_C_DEV_PPB_TESTING_DEV_H_ */ |
80 | 89 |
OLD | NEW |