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

Side by Side Diff: chrome/common/extensions/api/experimental.offscreenTabs.json

Issue 9234042: Re-land alexbost's experimental offscreenTabs API. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: merge / rebase Created 8 years, 10 months 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
OLDNEW
(Empty)
1 [
2 {
3 "namespace": "experimental.offscreenTabs",
4 "types": [
5 {
6 "id": "OffscreenTab",
7 "type": "object",
8 "properties": {
9 "id": {
10 "type": "integer",
11 "minimum": 0,
12 "description": "The ID of the offscreen tab. Tab IDs are unique with in a browser session."
13 },
14 "url": {
15 "type":
16 "string",
17 "description": "URL of the offscreen tab."
18 },
19 "width": {
20 "type": "integer",
21 "minimum": 0,
22 "description": "Width of the window."
23 },
24 "height": {
25 "type": "integer",
26 "minimum": 0,
27 "description": "Height of the window."
28 }
29 }
30 }
31 ],
32 "functions": [
33 {
34 "name": "create",
35 "type": "function",
36 "description": "Creates a new offscreen tab.",
37 "parameters": [
38 {
39 "name": "createProperties",
40 "type": "object",
41 "properties": {
42 "url": {
43 "type": "string",
44 "description": "The URL to navigate the offscreen tab to initial ly. Fully-qualified URLs must include a scheme (i.e. 'http://www.google.com', no t 'www.google.com'). Relative URLs will be relative to the current page within t he extension."
asargent_no_longer_on_chrome 2012/02/29 18:20:52 During the API review meeting we did for this many
jstritar 2012/03/12 14:53:06 Added a note about offscreen tab lifetime.
45 },
46 "width": {
47 "type": "integer",
48 "optional": true,
49 "minimum": 0,
50 "description": "Width of the offscreen tab. Defaults to width of the current tab."
51 },
52 "height": {
53 "type": "integer",
54 "optional": true,
55 "minimum": 0,
56 "description": "Height of the offscreen tab. Defaults to height of the current tab."
57 }
58 }
59 },
60 {
61 "name": "callback",
62 "type": "function",
63 "optional": true,
64 "parameters": [
65 {
66 "name": "offscreenTab",
67 "$ref": "OffscreenTab",
68 "optional": true,
69 "description": "Details of the offscreen tab."
70 }
71 ]
72 }
73 ]
74 },
75 {
76 "name": "get",
77 "type": "function",
78 "description": "Gets details about the specified offscreen tab.",
79 "parameters": [
80 {
81 "name": "offscreenTabId",
82 "type": "integer",
83 "minimum": 0,
84 "description": "ID of the offscreen tab."
85 },
86 {
87 "name": "callback",
88 "type": "function",
89 "parameters": [
90 {
91 "name": "offscreenTab",
92 "$ref": "OffscreenTab",
93 "description": "Details of the offscreen tab."
94 }
95 ]
96 }
97 ]
98 },
99 {
100 "name": "getAll",
101 "type": "function",
102 "description": "Gets an array of all offscreen tabs.",
103 "parameters": [
104 {
105 "name": "callback",
106 "type": "function",
107 "parameters": [
108 {
109 "name": "offscreenTabs",
110 "type": "array",
111 "items": {
112 "$ref": "OffscreenTab"
113 }
114 }
115 ]
116 }
117 ]
118 },
119 {
120 "name": "remove",
121 "type": "function",
122 "description": "Removes an offscreen tab.",
123 "parameters": [
124 {
125 "name": "offscreenTabId",
126 "type": "integer",
127 "minimum": 0,
128 "description": "ID of the offscreen tab."
129 },
130 {
131 "name": "callback",
132 "type": "function",
133 "optional": true
134 }
135 ]
136 },
137 {
138 "name": "sendMouseEvent",
139 "type": "function",
140 "description": "Dispatches a mouse event in the offscreen tab.",
141 "parameters": [
142 {
143 "name": "offscreenTabId",
144 "type": "integer",
145 "minimum": 0,
146 "description": "ID of the offscreen tab."
147 },
148 {
149 "name": "mouseEvent",
150 "type": "any",
asargent_no_longer_on_chrome 2012/02/29 18:20:52 Any reason the type here can't be "MouseEvent" ins
jstritar 2012/03/12 14:53:06 Think we can leave this as is for now? We've been
asargent_no_longer_on_chrome 2012/03/13 00:06:02 Ok - let's at least leave it as type "object" for
jstritar 2012/03/15 22:31:41 We end up only using a fraction of the properties
151 "description": "A JavaScript MouseEvent object. Supported event type s: <i>mousedown</i>, <i>mouseup</i>, <i>click</i>, <i>mousemove</i>, <i>mousewhe el</i>."
152 },
153 {
154 "name": "x",
155 "type": "integer",
156 "optional": true,
157 "minimum": 0,
158 "description": "X position of where the mouse event should be dispat ched on the offscreen web page. Not required in the case of a mousewheel event."
159 },
160 {
161 "name": "y",
162 "type": "integer",
163 "optional": true,
164 "minimum": 0,
165 "description": "Y position of where the mouse event should be dispat ched on the offscreen web page. Not required in the case of a mousewheel event."
166 },
167 {
168 "name": "callback",
169 "type": "function",
170 "optional": true,
171 "parameters": [
172 {
173 "name": "offscreenTab",
174 "$ref": "OffscreenTab",
asargent_no_longer_on_chrome 2012/02/29 18:20:52 It's unusual to be returning the OffscreenTab obje
jstritar 2012/03/12 14:53:06 Done. Removed the OffscreenTab parameter from the
175 "description": "Details of the offscreen tab."
176 }
177 ]
178 }
179 ]
180 },
181 {
182 "name": "sendKeyboardEvent",
183 "type": "function",
184 "description": "Dispatches a keyboard event in the offscreen tab.",
185 "parameters": [
186 {
187 "name": "offscreenTabId",
188 "type": "integer",
189 "minimum": 0,
190 "description": "ID of the offscreen tab."
191 },
192 {
193 "name": "keyboardEvent",
194 "type": "any",
asargent_no_longer_on_chrome 2012/02/29 18:20:52 same question here about type
jstritar 2012/03/12 14:53:06 Done.
195 "description": "A JavaScript KeyboardEvent object. Supported event t ypes: <i>keydown</i>, <i>keyup</i>, <i>keypress</i>. Note, only <i>keypress</i> produces a visible result on screen."
196 },
197 {
198 "name": "callback",
199 "type": "function",
200 "optional": true,
201 "parameters": [
202 {
203 "name": "offscreenTab",
204 "$ref": "OffscreenTab",
asargent_no_longer_on_chrome 2012/02/29 18:20:52 same thing here - weird to return the OffscreenTab
jstritar 2012/03/12 14:53:06 Done.
205 "description": "Details of the offscreen tab."
206 }
207 ]
208 }
209 ]
210 },
211 {
212 "name": "toDataUrl",
asargent_no_longer_on_chrome 2012/02/29 18:20:52 Instead returning the tab contents as a data url,
Ken Russell (switch to Gerrit) 2012/02/29 18:36:07 The eventual goal is to avoid reading back the con
asargent_no_longer_on_chrome 2012/03/01 00:20:05 Ok, fine by me.
213 "type": "function",
214 "description": "Captures the visible area of an offscreen tab. ",
215 "parameters": [
216 {
217 "name": "offscreenTabId",
218 "type": "integer",
219 "minimum": 0,
220 "description": "The ID of the offscreen tab."
221 },
222 {
223 "name": "options",
224 "type": "object",
225 "optional": true,
226 "description": "Set parameters of image capture, such as the format of the resulting image.",
227 "properties": {
228 "format": {
229 "type": "string",
230 "optional": true,
231 "enum": ["jpeg", "png"],
232 "description": "The format of the resulting image. Default is jp eg."
233 },
234 "quality": {
235 "type": "integer",
236 "optional": true,
237 "minimum": 0,
238 "maximum": 100,
239 "description": "When format is 'jpeg', controls the quality of t he resulting image. This value is ignored for PNG images. As quality is decrease d, the resulting image will have more visual artifacts, and the number of bytes needed to store it will decrease."
240 }
241 }
242 },
243 {
244 "name": "callback",
245 "type": "function",
246 "parameters": [
247 {
248 "name": "dataUrl",
249 "type": "string",
250 "description": "A data URL which encodes an image of the visible area of the captured offscreen tab. May be assigned to the 'src' property of an HTML Image element or WebGL texture source for display."
251 }
252 ]
253 }
254 ]
255 },
256 {
257 "name": "update",
258 "type": "function",
259 "description": "Modifies the properties of an offscreen tab. Properties that are not specified in updateProperties are not modified.",
260 "parameters": [
261 {
262 "name": "offscreenTabId",
263 "type": "integer",
264 "minimum": 0,
265 "description": "The ID of the offscreen tab."
266 },
267 {
268 "name": "updateProperties",
269 "type": "object",
270 "properties": {
271 "url": {
272 "type": "string",
273 "optional": true,
274 "description": "The URL the offscreen tab is displaying."
275 },
276 "width": {
277 "type": "integer",
278 "optional": true,
279 "minimum": 0,
280 "description": "Width of the window."
281 },
282 "height": {
283 "type": "integer",
284 "optional": true,
285 "minimum": 0,
286 "description": "Height of the window."
287 }
288 }
289 },
290 {
291 "name": "callback",
292 "type": "function",
293 "optional": true,
294 "parameters": [
295 {
296 "name": "offscreenTab",
297 "$ref": "OffscreenTab",
asargent_no_longer_on_chrome 2012/02/29 18:20:52 again, weird to return OffscreenTab here
jstritar 2012/03/12 14:53:06 Done.
298 "description": "Details of the offscreen tab."
299 }
300 ]
301 }
302 ]
303 }
304 ],
305 "events": [
306 {
307 "name": "onUpdated",
308 "type": "function",
309 "description": "Fires when an offscreen tab is updated. ",
310 "parameters": [
311 {
312 "name": "offscreenTabId",
313 "type": "integer",
314 "minimum": 0,
315 "description": "ID of the updated offscreen tab"
316 },
317 {
318 "name": "changeInfo",
319 "type": "object",
320 "description": "Lists the changes to the state of the offscreen tab that was updated.",
321 "properties": {
322 "url": {
323 "type": "string",
324 "optional": true,
325 "description": "The offscreen tab's URL if it has changed."
326 }
327 }
328 },
329 {
330 "name": "offscreenTab",
331 "$ref": "OffscreenTab",
332 "description": "Details of the offscreen tab."
333 }
334 ]
335 }
336 ]
337 }
338 ]
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698