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 | 5 |
6 /* From dev/ppb_testing_dev.idl modified Sat Nov 19 15:58:18 2011. */ | 6 /* From dev/ppb_testing_dev.idl modified Wed Dec 14 12:58:12 2011. */ |
7 | 7 |
8 #ifndef PPAPI_C_DEV_PPB_TESTING_DEV_H_ | 8 #ifndef PPAPI_C_DEV_PPB_TESTING_DEV_H_ |
9 #define PPAPI_C_DEV_PPB_TESTING_DEV_H_ | 9 #define PPAPI_C_DEV_PPB_TESTING_DEV_H_ |
10 | 10 |
| 11 #include "ppapi/c/dev/ppb_url_util_dev.h" |
11 #include "ppapi/c/pp_bool.h" | 12 #include "ppapi/c/pp_bool.h" |
12 #include "ppapi/c/pp_instance.h" | 13 #include "ppapi/c/pp_instance.h" |
13 #include "ppapi/c/pp_macros.h" | 14 #include "ppapi/c/pp_macros.h" |
14 #include "ppapi/c/pp_point.h" | 15 #include "ppapi/c/pp_point.h" |
15 #include "ppapi/c/pp_resource.h" | 16 #include "ppapi/c/pp_resource.h" |
16 #include "ppapi/c/pp_stdint.h" | 17 #include "ppapi/c/pp_stdint.h" |
| 18 #include "ppapi/c/pp_var.h" |
17 | 19 |
18 #define PPB_TESTING_DEV_INTERFACE_0_7 "PPB_Testing(Dev);0.7" | 20 #define PPB_TESTING_DEV_INTERFACE_0_7 "PPB_Testing(Dev);0.7" |
19 #define PPB_TESTING_DEV_INTERFACE_0_8 "PPB_Testing(Dev);0.8" | 21 #define PPB_TESTING_DEV_INTERFACE_0_8 "PPB_Testing(Dev);0.8" |
20 #define PPB_TESTING_DEV_INTERFACE PPB_TESTING_DEV_INTERFACE_0_8 | 22 #define PPB_TESTING_DEV_INTERFACE_0_9 "PPB_Testing(Dev);0.9" |
| 23 #define PPB_TESTING_DEV_INTERFACE PPB_TESTING_DEV_INTERFACE_0_9 |
21 | 24 |
22 /** | 25 /** |
23 * @file | 26 * @file |
24 * This file contains interface functions used for unit testing. Do not use in | 27 * This file contains interface functions used for unit testing. Do not use in |
25 * production code. They are not guaranteed to be available in normal plugin | 28 * production code. They are not guaranteed to be available in normal plugin |
26 * environments so you should not depend on them. | 29 * environments so you should not depend on them. |
27 */ | 30 */ |
28 | 31 |
29 | 32 |
30 /** | 33 /** |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 * | 108 * |
106 * Note that the browser may generate extra input events in order to | 109 * Note that the browser may generate extra input events in order to |
107 * maintain certain invariants, such as always having a "mouse enter" event | 110 * maintain certain invariants, such as always having a "mouse enter" event |
108 * before any other mouse event. Furthermore, the event the plugin receives | 111 * before any other mouse event. Furthermore, the event the plugin receives |
109 * after sending a simulated event will be slightly different from the | 112 * after sending a simulated event will be slightly different from the |
110 * original event. The browser may change the timestamp, add modifiers, and | 113 * original event. The browser may change the timestamp, add modifiers, and |
111 * slightly alter the mouse position, due to coordinate transforms it | 114 * slightly alter the mouse position, due to coordinate transforms it |
112 * performs. | 115 * performs. |
113 */ | 116 */ |
114 void (*SimulateInputEvent)(PP_Instance instance, PP_Resource input_event); | 117 void (*SimulateInputEvent)(PP_Instance instance, PP_Resource input_event); |
| 118 /** |
| 119 * Returns the URL for the document. This is a safe way to retrieve |
| 120 * window.location.href. |
| 121 * If the canonicalized URL is valid, the method will parse the URL |
| 122 * and fill in the components structure. This pointer may be NULL |
| 123 * to specify that no component information is necessary. |
| 124 */ |
| 125 struct PP_Var (*GetDocumentURL)(PP_Instance instance, |
| 126 struct PP_URLComponents_Dev* components); |
115 }; | 127 }; |
116 | 128 |
117 struct PPB_Testing_Dev_0_7 { | 129 struct PPB_Testing_Dev_0_7 { |
118 PP_Bool (*ReadImageData)(PP_Resource device_context_2d, | 130 PP_Bool (*ReadImageData)(PP_Resource device_context_2d, |
119 PP_Resource image, | 131 PP_Resource image, |
120 const struct PP_Point* top_left); | 132 const struct PP_Point* top_left); |
121 void (*RunMessageLoop)(PP_Instance instance); | 133 void (*RunMessageLoop)(PP_Instance instance); |
122 void (*QuitMessageLoop)(PP_Instance instance); | 134 void (*QuitMessageLoop)(PP_Instance instance); |
123 uint32_t (*GetLiveObjectsForInstance)(PP_Instance instance); | 135 uint32_t (*GetLiveObjectsForInstance)(PP_Instance instance); |
124 PP_Bool (*IsOutOfProcess)(); | 136 PP_Bool (*IsOutOfProcess)(); |
125 }; | 137 }; |
| 138 |
| 139 struct PPB_Testing_Dev_0_8 { |
| 140 PP_Bool (*ReadImageData)(PP_Resource device_context_2d, |
| 141 PP_Resource image, |
| 142 const struct PP_Point* top_left); |
| 143 void (*RunMessageLoop)(PP_Instance instance); |
| 144 void (*QuitMessageLoop)(PP_Instance instance); |
| 145 uint32_t (*GetLiveObjectsForInstance)(PP_Instance instance); |
| 146 PP_Bool (*IsOutOfProcess)(); |
| 147 void (*SimulateInputEvent)(PP_Instance instance, PP_Resource input_event); |
| 148 }; |
126 /** | 149 /** |
127 * @} | 150 * @} |
128 */ | 151 */ |
129 | 152 |
130 #endif /* PPAPI_C_DEV_PPB_TESTING_DEV_H_ */ | 153 #endif /* PPAPI_C_DEV_PPB_TESTING_DEV_H_ */ |
131 | 154 |
OLD | NEW |