Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(408)

Side by Side Diff: ppapi/api/private/ppb_flash.idl

Issue 8930023: Rev the Flash interface to add new functionality. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 /**
58 * Navigate to URL. May open a new tab if target is not "_self". Return true
38 * if success. This differs from javascript:window.open() in that it bypasses 59 * if success. This differs from javascript:window.open() in that it bypasses
39 * the popup blocker, even when this is not called from an event handler. 60 * the popup blocker, even when this is not called from an event handler.
40 */ 61 */
41 PP_Bool NavigateToURL( 62 int32_t Navigate(
42 [in] PP_Instance instance, 63 [in] PP_Resource request_info,
43 [in] str_t url, 64 [in] str_t target,
44 [in] str_t target); 65 [in] PP_Bool from_user_action);
45 66
46 /* Runs a nested message loop. The plugin will be reentered from this call. 67 /**
68 * 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 69 * 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 70 * message loop (e.g., when displaying context menus), but Pepper provides
49 * only an asynchronous call. After performing that asynchronous call, call 71 * only an asynchronous call. After performing that asynchronous call, call
50 * |RunMessageLoop()|. In the callback, call |QuitMessageLoop()|. 72 * |RunMessageLoop()|. In the callback, call |QuitMessageLoop()|.
51 */ 73 */
52 void RunMessageLoop( 74 void RunMessageLoop(
53 [in] PP_Instance instance); 75 [in] PP_Instance instance);
54 76
55 /* Posts a quit message for the outermost nested message loop. Use this to 77 /* 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. 78 * exit and return back to the caller after you call RunMessageLoop.
57 */ 79 */
58 void QuitMessageLoop( 80 void QuitMessageLoop(
59 [in] PP_Instance instance); 81 [in] PP_Instance instance);
82
83 /**
84 * Retrieves the local time zone offset from GM time for the given UTC time.
85 */
86 double_t GetLocalTimeZoneOffset(
87 [in] PP_Instance instance,
88 [in] PP_Time t);
89
90 /**
91 * Gets a (string) with "command-line" options for Flash; used to pass
92 * run-time debugging parameters, etc.
93 */
94 PP_Var GetCommandLineArgs(
95 [in] PP_Module module);
96
97 /**
98 * Loads the given font in a more privledged process on Windows. Call this if
viettrungluu 2011/12/14 18:10:45 spelling: privileged
99 * Windows is giving errors for font calls. See
100 * content/renderer/font_cache_dispatcher_win.cc
101 *
102 * The parameter is a pointer to a LOGFONTW structure.
103 *
104 * On non-Windows platforms, this function does nothing.
105 */
106 void PreLoadFontInWindows(
viettrungluu 2011/12/14 18:10:45 Let's follow Chromium-ish conventions and just cal
107 [in] mem_t logfontw);
60 }; 108 };
109
110 #inline c
111 /**
112 * The old version of the interface, which cannot be generated from IDL.
113 * TODO(viettrungluu): Remove this when enough time has passed. crbug.com/104184
114 */
115 #define PPB_FLASH_INTERFACE_11_0 "PPB_Flash;11"
116 struct PPB_Flash_11 {
117 void (*SetInstanceAlwaysOnTop)(PP_Instance instance, PP_Bool on_top);
118 PP_Bool (*DrawGlyphs)(PP_Instance instance,
119 PP_Resource pp_image_data,
120 const struct PP_FontDescription_Dev* font_desc,
121 uint32_t color,
122 struct PP_Point position,
123 struct PP_Rect clip,
124 const float transformation[3][3],
125 uint32_t glyph_count,
126 const uint16_t glyph_indices[],
127 const struct PP_Point glyph_advances[]);
128 struct PP_Var (*GetProxyForURL)(PP_Instance instance, const char* url);
129 int32_t (*Navigate)(PP_Resource request_info,
130 const char* target,
131 bool from_user_action);
132 void (*RunMessageLoop)(PP_Instance instance);
133 void (*QuitMessageLoop)(PP_Instance instance);
134 double (*GetLocalTimeZoneOffset)(PP_Instance instance, PP_Time t);
135 struct PP_Var (*GetCommandLineArgs)(PP_Module module);
136 };
137 #endinl
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698