cc: Added inline to Tile::IsReadyToDraw
[chromium-blink-merge.git] / ppapi / api / private / ppb_flash.idl
blobf16cbc9c2d1206757e47ed12b89d2b47f0aeb2c4
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file.
4 */
6 /**
7 * This file contains the <code>PPB_Flash</code> interface.
8 */
10 label Chrome {
11 M21 = 12.4,
12 M22 = 12.5,
13 M24_0 = 12.6,
14 M24_1 = 13.0
17 [assert_size(4)]
18 enum PP_FlashLSORestrictions {
19 /**
20 * No restrictions on Flash LSOs.
22 PP_FLASHLSORESTRICTIONS_NONE = 1,
24 /**
25 * Don't allow access to Flash LSOs.
27 PP_FLASHLSORESTRICTIONS_BLOCK = 2,
29 /**
30 * Store Flash LSOs in memory only.
32 PP_FLASHLSORESTRICTIONS_IN_MEMORY = 3
35 [assert_size(4)]
36 enum PP_FlashSetting {
37 /**
38 * Specifies if the system likely supports 3D hardware acceleration.
40 * The result is a boolean PP_Var, depending on the supported nature of 3D
41 * acceleration. If querying this function returns true, the 3D system will
42 * normally use the native hardware for rendering which will be much faster.
44 * Having this set to true only means that 3D should be used to draw 2D and
45 * video elements. PP_FLASHSETTING_STAGE3D_ENABLED should be checked to
46 * determine if it's ok to use 3D for arbitrary content.
48 * In rare cases (depending on the platform) this value will be true but a
49 * created 3D context will use emulation because context initialization
50 * failed.
52 PP_FLASHSETTING_3DENABLED = 1,
54 /**
55 * Specifies if the given instance is in private/incognito/off-the-record mode
56 * (returns true) or "regular" mode (returns false). Returns an undefined
57 * PP_Var on invalid instance.
59 PP_FLASHSETTING_INCOGNITO = 2,
61 /**
62 * Specifies if arbitrary 3d commands are supported (returns true), or if 3d
63 * should only be used for drawing 2d and video (returns false).
65 * This should only be enabled if PP_FLASHSETTING_3DENABLED is true.
67 PP_FLASHSETTING_STAGE3DENABLED = 3,
69 /**
70 * Specifies the string for the language code of the UI of the browser.
72 * For example: "en-US" or "de".
74 * Returns an undefined PP_Var on invalid instance.
76 PP_FLASHSETTING_LANGUAGE = 4,
78 /**
79 * Specifies the number of CPU cores that are present on the system.
81 PP_FLASHSETTING_NUMCORES = 5,
83 /**
84 * Specifies restrictions on how flash should handle LSOs. The result is an
85 * int from <code>PP_FlashLSORestrictions</code>.
87 PP_FLASHSETTING_LSORESTRICTIONS = 6,
89 /**
90 * Specifies if the driver is reliable enough to use Shader Model 3 commands
91 * with it.
93 * This should only be enabled if PP_FLASHSETTING_STAGE3DENABLED is true.
95 PP_FLASHSETTING_STAGE3DBASELINEENABLED = 7
98 /**
99 * This enum provides keys for setting breakpad crash report data.
101 [assert_size(4)]
102 enum PP_FlashCrashKey {
104 * Specifies the document URL which contains the flash instance.
106 PP_FLASHCRASHKEY_URL = 1,
109 * Specifies the URL of the current swf.
111 PP_FLASHCRASHKEY_RESOURCE_URL = 2
115 * The <code>PPB_Flash</code> interface contains pointers to various functions
116 * that are only needed to support Pepper Flash.
118 interface PPB_Flash {
120 * Sets or clears the rendering hint that the given plugin instance is always
121 * on top of page content. Somewhat more optimized painting can be used in
122 * this case.
124 void SetInstanceAlwaysOnTop(
125 [in] PP_Instance instance,
126 [in] PP_Bool on_top);
129 * Draws the given pre-laid-out text. It is almost equivalent to Windows'
130 * ExtTextOut with the addition of the transformation (a 3x3 matrix given the
131 * transform to apply before drawing). It also adds the allow_subpixel_aa
132 * flag which when true, will use subpixel antialiasing if enabled in the
133 * system settings. For this to work properly, the graphics layer that the
134 * text is being drawn into must be opaque.
136 PP_Bool DrawGlyphs(
137 [in] PP_Instance instance,
138 [in] PP_Resource pp_image_data,
139 [in] PP_BrowserFont_Trusted_Description font_desc,
140 [in] uint32_t color,
141 [in] PP_Point position,
142 [in] PP_Rect clip,
143 [in] float_t[3][3] transformation,
144 [in] PP_Bool allow_subpixel_aa,
145 [in] uint32_t glyph_count,
146 [in, size_is(glyph_count)] uint16_t[] glyph_indices,
147 [in, size_is(glyph_count)] PP_Point[] glyph_advances);
150 * Retrieves the proxy that will be used for the given URL. The result will
151 * be a string in PAC format, or an undefined var on error.
153 PP_Var GetProxyForURL(
154 [in] PP_Instance instance,
155 [in] str_t url);
158 * Navigate to the URL given by the given URLRequestInfo. (This supports GETs,
159 * POSTs, and javascript: URLs.) May open a new tab if target is not "_self".
161 int32_t Navigate(
162 [in] PP_Resource request_info,
163 [in] str_t target,
164 [in] PP_Bool from_user_action);
167 * Deprecated. Does nothing. Use PPB_Flash_MessageLoop.
169 [deprecate=13.0]
170 void RunMessageLoop(
171 [in] PP_Instance instance);
174 * Deprecated. Does nothing. Use PPB_Flash_MessageLoop.
176 [deprecate=13.0]
177 void QuitMessageLoop(
178 [in] PP_Instance instance);
181 * Retrieves the local time zone offset from GM time for the given UTC time.
183 double_t GetLocalTimeZoneOffset(
184 [in] PP_Instance instance,
185 [in] PP_Time t);
188 * Gets a (string) with "command-line" options for Flash; used to pass
189 * run-time debugging parameters, etc.
191 PP_Var GetCommandLineArgs(
192 [in] PP_Module module);
195 * Loads the given font in a more privileged process on Windows. Call this if
196 * Windows is giving errors for font calls. See
197 * content/renderer/font_cache_dispatcher_win.cc
199 * The parameter is a pointer to a LOGFONTW structure.
201 * On non-Windows platforms, this function does nothing.
203 void PreloadFontWin(
204 [in] mem_t logfontw);
207 * Returns whether the given rectangle (in the plugin) is topmost, i.e., above
208 * all other web content.
210 PP_Bool IsRectTopmost(
211 [in] PP_Instance instance,
212 [in] PP_Rect rect);
215 * Deprecated. Does nothing. Use PPB_Flash_Print.
217 [deprecate=13.0]
218 int32_t InvokePrinting(
219 [in] PP_Instance instance);
222 * Indicates that there's activity and, e.g., the screensaver shouldn't kick
223 * in.
225 void UpdateActivity(
226 [in] PP_Instance instance);
229 * Deprecated. Does nothing.
231 [deprecate=13.0]
232 PP_Var GetDeviceID([in] PP_Instance instance);
235 * Deprecated. Does nothing. See GetSetting().
237 [deprecate=13.0]
238 int32_t GetSettingInt([in] PP_Instance instance,
239 [in] PP_FlashSetting setting);
242 * Returns the value associated with the given setting. Invalid enums will
243 * result in an undefined PP_Var return value.
245 PP_Var GetSetting(PP_Instance instance, PP_FlashSetting setting);
248 * Allows setting breakpad crash data which will be included in plugin crash
249 * reports. Returns PP_FALSE if crash data could not be set.
251 [version=12.5]
252 PP_Bool SetCrashData([in] PP_Instance instance,
253 [in] PP_FlashCrashKey key,
254 [in] PP_Var value);
257 * Enumerates video capture devices. |video_capture| is a valid
258 * PPB_VideoCapture_Dev resource. Once the operation has completed
259 * successfully, |devices| will be set up with an array of
260 * PPB_DeviceRef_Dev resources.
262 * PP_OK is returned on success and different pepper error code on failure.
263 * The ref count of the returned |devices| has already been increased by 1 for
264 * the caller.
266 * NOTE: This method is a synchronous version of |EnumerateDevices| in
267 * PPB_VideoCapture_Dev.
269 [version=12.6]
270 int32_t EnumerateVideoCaptureDevices(
271 [in] PP_Instance instance,
272 [in] PP_Resource video_capture,
273 [in] PP_ArrayOutput devices);