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 /* This file contains PPB_Flash interface. */ | 6 /** |
7 * This file contains the <code>PPB_Flash</code> interface. | |
8 */ | |
7 | 9 |
8 /* PPB_Flash interface. */ | 10 label Chrome { |
9 interface PPB_Flash_0_7 { | 11 M17 = 12.0 |
10 /* Sets or clears the rendering hint that the given plugin instance is always | 12 }; |
13 | |
14 /** | |
15 * The <code>PPB_Flash</code> interface contains pointers to various functions | |
16 * that are only needed to support Pepper Flash. | |
17 */ | |
18 interface PPB_Flash { | |
19 /** | |
20 * Sets or clears the rendering hint that the given plugin instance is always | |
11 * on top of page content. Somewhat more optimized painting can be used in | 21 * on top of page content. Somewhat more optimized painting can be used in |
12 * this case. | 22 * this case. |
13 */ | 23 */ |
14 void SetInstanceAlwaysOnTop( | 24 void SetInstanceAlwaysOnTop( |
15 [in] PP_Instance instance, | 25 [in] PP_Instance instance, |
16 [in] PP_Bool on_top); | 26 [in] PP_Bool on_top); |
17 | 27 |
28 /** | |
29 * Draws the given pre-laid-out text. It is almost equivalent to Windows' | |
30 * ExtTextOut with the addition of the transformation (a 3x3 matrix given the | |
31 * transform to apply before drawing). It also adds the allow_subpixel_aa | |
32 * flag which when true, will use subpixel antialiasing if enabled in the | |
33 * system settings. For this to work properly, the graphics layer that the | |
34 * text is being drawn into must be opaque. | |
35 */ | |
18 PP_Bool DrawGlyphs( | 36 PP_Bool DrawGlyphs( |
19 [in] PP_Instance instance, | 37 [in] PP_Instance instance, |
20 [in] PP_Resource pp_image_data, | 38 [in] PP_Resource pp_image_data, |
21 [in] PP_FontDescription_Dev font_desc, | 39 [in] PP_FontDescription_Dev font_desc, |
22 [in] uint32_t color, | 40 [in] uint32_t color, |
23 [in] PP_Point position, | 41 [in] PP_Point position, |
24 [in] PP_Rect clip, | 42 [in] PP_Rect clip, |
25 [in] float_t[3][3] transformation, | 43 [in] float_t[3][3] transformation, |
44 [in] PP_Bool allow_subpixel_aa, | |
26 [in] uint32_t glyph_count, | 45 [in] uint32_t glyph_count, |
27 [in, size_is(glyph_count)] uint16_t[] glyph_indices, | 46 [in, size_is(glyph_count)] uint16_t[] glyph_indices, |
28 [in, size_is(glyph_count)] PP_Point[] glyph_advances); | 47 [in, size_is(glyph_count)] PP_Point[] glyph_advances); |
29 | 48 |
30 /* Retrieves the proxy that will be used for the given URL. The result will | 49 /** |
50 * Retrieves the proxy that will be used for the given URL. The result will | |
31 * be a string in PAC format, or an undefined var on error. | 51 * be a string in PAC format, or an undefined var on error. |
32 */ | 52 */ |
33 PP_Var GetProxyForURL( | 53 PP_Var GetProxyForURL( |
34 [in] PP_Instance instance, | 54 [in] PP_Instance instance, |
35 [in] str_t url); | 55 [in] str_t url); |
36 | 56 |
37 /* Navigate to URL. May open a new tab if target is not "_self". Return true | 57 /** |
38 * if success. This differs from javascript:window.open() in that it bypasses | 58 * Navigate to the URL given by the given URLRequestInfo. (This supports GETs, |
39 * the popup blocker, even when this is not called from an event handler. | 59 * POSTs, and javascript: URLs.) May open a new tab if target is not "_self". |
40 */ | 60 */ |
41 PP_Bool NavigateToURL( | 61 int32_t Navigate( |
42 [in] PP_Instance instance, | 62 [in] PP_Resource request_info, |
43 [in] str_t url, | 63 [in] str_t target, |
44 [in] str_t target); | 64 [in] PP_Bool from_user_action); |
45 | 65 |
46 /* Runs a nested message loop. The plugin will be reentered from this call. | 66 /** |
67 * Runs a nested message loop. The plugin will be reentered from this call. | |
47 * This function is used in places where Flash would normally enter a nested | 68 * This function is used in places where Flash would normally enter a nested |
48 * message loop (e.g., when displaying context menus), but Pepper provides | 69 * message loop (e.g., when displaying context menus), but Pepper provides |
49 * only an asynchronous call. After performing that asynchronous call, call | 70 * only an asynchronous call. After performing that asynchronous call, call |
50 * |RunMessageLoop()|. In the callback, call |QuitMessageLoop()|. | 71 * |RunMessageLoop()|. In the callback, call |QuitMessageLoop()|. |
51 */ | 72 */ |
52 void RunMessageLoop( | 73 void RunMessageLoop( |
53 [in] PP_Instance instance); | 74 [in] PP_Instance instance); |
54 | 75 |
55 /* Posts a quit message for the outermost nested message loop. Use this to | 76 /* Posts a quit message for the outermost nested message loop. Use this to |
56 * exit and return back to the caller after you call RunMessageLoop. | 77 * exit and return back to the caller after you call RunMessageLoop. |
57 */ | 78 */ |
58 void QuitMessageLoop( | 79 void QuitMessageLoop( |
59 [in] PP_Instance instance); | 80 [in] PP_Instance instance); |
81 | |
82 /** | |
83 * Retrieves the local time zone offset from GM time for the given UTC time. | |
84 */ | |
85 double_t GetLocalTimeZoneOffset( | |
86 [in] PP_Instance instance, | |
87 [in] PP_Time t); | |
88 | |
89 /** | |
90 * Gets a (string) with "command-line" options for Flash; used to pass | |
91 * run-time debugging parameters, etc. | |
92 */ | |
93 PP_Var GetCommandLineArgs( | |
94 [in] PP_Module module); | |
95 | |
96 /** | |
97 * Loads the given font in a more priviledged process on Windows. Call this if | |
98 * Windows is giving errors for font calls. See | |
99 * content/renderer/font_cache_dispatcher_win.cc | |
100 * | |
101 * The parameter is a pointer to a LOGFONTW structure. | |
102 * | |
103 * On non-Windows platforms, this function does nothing. | |
104 */ | |
105 void PreloadFontWin( | |
106 [in] mem_t logfontw); | |
60 }; | 107 }; |
108 | |
109 #inline c | |
110 /** | |
111 * The old version of the interface, which cannot be generated from IDL. | |
112 * TODO(viettrungluu): Remove this when enough time has passed. crbug.com/104184 | |
113 */ | |
114 #define PPB_FLASH_INTERFACE_11_0 "PPB_Flash;11" | |
115 struct PPB_Flash_11 { | |
116 void (*SetInstanceAlwaysOnTop)(PP_Instance instance, PP_Bool on_top); | |
117 PP_Bool (*DrawGlyphs)(PP_Instance instance, | |
118 PP_Resource pp_image_data, | |
119 const struct PP_FontDescription_Dev* font_desc, | |
120 uint32_t color, | |
121 struct PP_Point position, | |
122 struct PP_Rect clip, | |
123 const float transformation[3][3], | |
124 uint32_t glyph_count, | |
125 const uint16_t glyph_indices[], | |
126 const struct PP_Point glyph_advances[]); | |
127 struct PP_Var (*GetProxyForURL)(PP_Instance instance, const char* url); | |
128 int32_t (*Navigate)(PP_Resource request_info, | |
129 const char* target, | |
130 bool from_user_action); | |
jvoung - send to chromium...
2011/12/16 18:39:05
Driveby: should this be inline cc (or whatever the
brettw
2011/12/16 18:55:10
I don't know. I don't think it changes the output
| |
131 void (*RunMessageLoop)(PP_Instance instance); | |
132 void (*QuitMessageLoop)(PP_Instance instance); | |
133 double (*GetLocalTimeZoneOffset)(PP_Instance instance, PP_Time t); | |
134 struct PP_Var (*GetCommandLineArgs)(PP_Module module); | |
135 }; | |
136 #endinl | |
OLD | NEW |