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 /** | 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 */ |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 * associated with this plugin instance. Used for detecting leaks. Returns | 70 * associated with this plugin instance. Used for detecting leaks. Returns |
71 * (uint32_t)-1 on failure. | 71 * (uint32_t)-1 on failure. |
72 */ | 72 */ |
73 uint32_t GetLiveObjectsForInstance([in] PP_Instance instance); | 73 uint32_t GetLiveObjectsForInstance([in] PP_Instance instance); |
74 | 74 |
75 /** | 75 /** |
76 * 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 |
77 * otherwise. | 77 * otherwise. |
78 */ | 78 */ |
79 PP_Bool IsOutOfProcess(); | 79 PP_Bool IsOutOfProcess(); |
80 | 80 |
81 /** | 81 /** |
82 * Returns PP_TRUE if the plugin is peripheral, PP_FALSE otherwise. | 82 * Posts the plugin's current Power Saver status to JavaScript. The plugin |
| 83 * itself does not recieve anything. This is not idiomatic for Pepper, |
| 84 * but convenient for testing. |
83 */ | 85 */ |
84 PP_Bool IsPeripheral([in] PP_Instance instance); | 86 void PostPowerSaverStatus([in] PP_Instance instance); |
| 87 |
| 88 /** |
| 89 * Subscribes to changes to the plugin's Power Saver status. The status |
| 90 * changes are not forwarded to the plugin itself, but posted to JavaScript. |
| 91 * This is not idiomatic for Pepper, but conveienent for testing. |
| 92 */ |
| 93 void SubscribeToPowerSaverNotifications([in] PP_Instance instance); |
85 | 94 |
86 /** | 95 /** |
87 * Passes the input event to the browser, which sends it back to the | 96 * Passes the input event to the browser, which sends it back to the |
88 * plugin. The plugin should implement PPP_InputEvent and register for | 97 * plugin. The plugin should implement PPP_InputEvent and register for |
89 * the input event type. | 98 * the input event type. |
90 * | 99 * |
91 * This method sends an input event through the browser just as if it had | 100 * This method sends an input event through the browser just as if it had |
92 * come from the user. If the browser determines that it is an event for the | 101 * come from the user. If the browser determines that it is an event for the |
93 * plugin, it will be sent to be handled by the plugin's PPP_InputEvent | 102 * plugin, it will be sent to be handled by the plugin's PPP_InputEvent |
94 * interface. When generating mouse events, make sure the position is within | 103 * interface. When generating mouse events, make sure the position is within |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 * to its default. The threshold is in bytes. | 144 * to its default. The threshold is in bytes. |
136 */ | 145 */ |
137 void SetMinimumArrayBufferSizeForShmem([in] PP_Instance instance, | 146 void SetMinimumArrayBufferSizeForShmem([in] PP_Instance instance, |
138 [in] uint32_t threshold); | 147 [in] uint32_t threshold); |
139 | 148 |
140 /** | 149 /** |
141 * Run the V8 garbage collector for tests. | 150 * Run the V8 garbage collector for tests. |
142 */ | 151 */ |
143 void RunV8GC([in] PP_Instance instance); | 152 void RunV8GC([in] PP_Instance instance); |
144 }; | 153 }; |
OLD | NEW |