OLD | NEW |
1 /* Copyright 2013 The Chromium Authors. All rights reserved. | 1 /* Copyright 2013 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 private/ppb_testing_private.idl modified Fri May 1 13:14:52 2015. */ | 6 /* From private/ppb_testing_private.idl modified Fri May 1 13:14:52 2015. */ |
7 | 7 |
8 #ifndef PPAPI_C_PRIVATE_PPB_TESTING_PRIVATE_H_ | 8 #ifndef PPAPI_C_PRIVATE_PPB_TESTING_PRIVATE_H_ |
9 #define PPAPI_C_PRIVATE_PPB_TESTING_PRIVATE_H_ | 9 #define PPAPI_C_PRIVATE_PPB_TESTING_PRIVATE_H_ |
10 | 10 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 * The returned image data will represent the current status of the backing | 59 * The returned image data will represent the current status of the backing |
60 * store. This will not include any paint, scroll, or replace operations | 60 * store. This will not include any paint, scroll, or replace operations |
61 * that have not yet been flushed; these operations are only reflected in | 61 * that have not yet been flushed; these operations are only reflected in |
62 * the backing store (and hence ReadImageData) until after a Flush() | 62 * the backing store (and hence ReadImageData) until after a Flush() |
63 * operation has completed. | 63 * operation has completed. |
64 */ | 64 */ |
65 PP_Bool (*ReadImageData)(PP_Resource device_context_2d, | 65 PP_Bool (*ReadImageData)(PP_Resource device_context_2d, |
66 PP_Resource image, | 66 PP_Resource image, |
67 const struct PP_Point* top_left); | 67 const struct PP_Point* top_left); |
68 /** | 68 /** |
69 * Runs a nested message loop. The plugin will be reentered from this call. | 69 * Runs a nested run loop. The plugin will be reentered from this call. |
70 * This function is used for unit testing the API. The normal pattern is to | 70 * This function is used for unit testing the API. The normal pattern is to |
71 * issue some asynchronous call that has a callback. Then you call | 71 * issue some asynchronous call that has a callback. Then you call |
72 * RunMessageLoop which will suspend the plugin and go back to processing | 72 * RunMessageLoop which will suspend the plugin and go back to processing |
73 * messages, giving the asynchronous operation time to complete. In your | 73 * messages, giving the asynchronous operation time to complete. In your |
74 * callback, you save the data and call QuitMessageLoop, which will then | 74 * callback, you save the data and call QuitMessageLoop, which will then |
75 * pop back up and continue with the test. This avoids having to write a | 75 * pop back up and continue with the test. This avoids having to write a |
76 * complicated state machine for simple tests for asynchronous APIs. | 76 * complicated state machine for simple tests for asynchronous APIs. |
77 */ | 77 */ |
78 void (*RunMessageLoop)(PP_Instance instance); | 78 void (*RunMessageLoop)(PP_Instance instance); |
79 /** | 79 /** |
80 * Posts a quit message for the outermost nested message loop. Use this to | 80 * Posts a quit message for the outermost nested run loop. Use this to |
81 * exit and return back to the caller after you call RunMessageLoop. | 81 * exit and return back to the caller after you call RunMessageLoop. |
82 */ | 82 */ |
83 void (*QuitMessageLoop)(PP_Instance instance); | 83 void (*QuitMessageLoop)(PP_Instance instance); |
84 /** | 84 /** |
85 * Returns the number of live objects (resources + strings + objects) | 85 * Returns the number of live objects (resources + strings + objects) |
86 * associated with this plugin instance. Used for detecting leaks. Returns | 86 * associated with this plugin instance. Used for detecting leaks. Returns |
87 * (uint32_t)-1 on failure. | 87 * (uint32_t)-1 on failure. |
88 */ | 88 */ |
89 uint32_t (*GetLiveObjectsForInstance)(PP_Instance instance); | 89 uint32_t (*GetLiveObjectsForInstance)(PP_Instance instance); |
90 /** | 90 /** |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 void (*RunV8GC)(PP_Instance instance); | 158 void (*RunV8GC)(PP_Instance instance); |
159 }; | 159 }; |
160 | 160 |
161 typedef struct PPB_Testing_Private_1_0 PPB_Testing_Private; | 161 typedef struct PPB_Testing_Private_1_0 PPB_Testing_Private; |
162 /** | 162 /** |
163 * @} | 163 * @} |
164 */ | 164 */ |
165 | 165 |
166 #endif /* PPAPI_C_PRIVATE_PPB_TESTING_PRIVATE_H_ */ | 166 #endif /* PPAPI_C_PRIVATE_PPB_TESTING_PRIVATE_H_ */ |
167 | 167 |
OLD | NEW |