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 /** | 6 /** |
7 * This file contains interface functions used for unit testing. Do not use in | 7 * This file contains interface functions used for unit testing. Do not use in |
8 * production code. They are not guaranteed to be available in normal plugin | 8 * production code. They are not guaranteed to be available in normal plugin |
9 * environments so you should not depend on them. | 9 * environments so you should not depend on them. |
10 */ | 10 */ |
11 | 11 |
12 label Chrome { | 12 label Chrome { |
13 M14 = 0.7 | 13 M14 = 0.7, |
| 14 M15 = 0.8 |
14 }; | 15 }; |
15 | 16 |
16 interface PPB_Testing_Dev { | 17 interface PPB_Testing_Dev { |
17 /** | 18 /** |
18 * Reads the bitmap data out of the backing store for the given | 19 * Reads the bitmap data out of the backing store for the given |
19 * DeviceContext2D and into the given image. If the data was successfully | 20 * DeviceContext2D and into the given image. If the data was successfully |
20 * read, it will return PP_TRUE. | 21 * read, it will return PP_TRUE. |
21 * | 22 * |
22 * This function should not generally be necessary for normal plugin | 23 * This function should not generally be necessary for normal plugin |
23 * operation. If you want to update portions of a device, the expectation is | 24 * operation. If you want to update portions of a device, the expectation is |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 * associated with this plugin instance. Used for detecting leaks. Returns | 71 * associated with this plugin instance. Used for detecting leaks. Returns |
71 * (uint32_t)-1 on failure. | 72 * (uint32_t)-1 on failure. |
72 */ | 73 */ |
73 uint32_t GetLiveObjectsForInstance([in] PP_Instance instance); | 74 uint32_t GetLiveObjectsForInstance([in] PP_Instance instance); |
74 | 75 |
75 /** | 76 /** |
76 * Returns PP_TRUE if the plugin is running out-of-process, PP_FALSE | 77 * Returns PP_TRUE if the plugin is running out-of-process, PP_FALSE |
77 * otherwise. | 78 * otherwise. |
78 */ | 79 */ |
79 PP_Bool IsOutOfProcess(); | 80 PP_Bool IsOutOfProcess(); |
| 81 |
| 82 /** |
| 83 * Passes the input event to the browser, which sends it back to the |
| 84 * plugin. The plugin should implement PPP_InputEvent and register for |
| 85 * the input event type. |
| 86 * |
| 87 * This method sends an input event through the browser just as if it had |
| 88 * come from the user. If the browser determines that it is an event for the |
| 89 * plugin, it will be sent to be handled by the plugin's PPP_InputEvent |
| 90 * interface. When generating mouse events, make sure the position is within |
| 91 * the plugin's area on the page. When generating a keyboard event, make sure |
| 92 * the plugin is focused. |
| 93 * |
| 94 * Note that the browser may generate extra input events in order to |
| 95 * maintain certain invariants, such as always having a "mouse enter" event |
| 96 * before any other mouse event. Furthermore, the event the plugin receives |
| 97 * after sending a simulated event will be slightly different from the |
| 98 * original event. The browser may change the timestamp, add modifiers, and |
| 99 * slightly alter the mouse position, due to coordinate transforms it |
| 100 * performs. |
| 101 */ |
| 102 [version=0.8] |
| 103 void SimulateInputEvent([in] PP_Instance instance, |
| 104 [in] PP_Resource input_event); |
80 }; | 105 }; |
OLD | NEW |