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

Side by Side Diff: chrome/common/extensions/api/extension_api.json

Issue 159607: Extension docs build script, gyp target and PRESUBMIT.PY check (Closed)
Patch Set: remove build step on mac Created 11 years, 4 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
« no previous file with comments | « chrome/common/extensions/PRESUBMIT.PY ('k') | chrome/common/extensions/docs/api_index.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 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
5 /*
6 * This file defines the extensions api functions, events and types. It is
7 * json-structured list of api "modules". Each module has
8 *
9 * namespace: "<apiname>", // i.e. "windows" which becomes visible to
10 * // extensions as chrome.windows.
11 *
12 * types: [], // a list of json schemas which define "types"
13 * // that are common to that module. i.e. "Tab" or
14 * // "BookmarkTreeNode".
15 *
16 * functions: [], // a list of json schemas which define the
17 * // functions in the current module. i.e.
18 * // chrome.tabs.getCurrent().
19 *
20 * events: [], // a list of json schemas which define the events
21 * // which this module defines. i.e.
22 * // chrome.windows.onCreated.
23 *
24 * --Functions Schemas--
25 * Each function schema is required to have a
26 *
27 * name: "<function name>"
28 * type: "function"
29 * description: "..." // this appears in the docs.
30 * parameters: []
31 *
32 * |parameters| is a list of json schemas which define the list of parameters
33 * this function requires and will be validated against. Each parameter
34 * should define a "name" property, and "description" property, both of which
35 * will appear in the docs. The final parameter may be a type: "function"
36 * which is expected to be the callback for this call. That parameter, should
37 * itself be named ("name": "callback"), have a "parameters" member that
38 * is a list of the json schemas that define the types that the callback
39 * sends. Callback parameters should also have "name" and "description"
40 * properties.
41 *
42 * --Event Schemas--
43 * Each event schema is also a type: "function" schema that is named. It's
44 * structure is the same as the callback functions for module Functions.
45 * It should have a "name", "description", and a "parameters" describing
46 * the set of arguments it sends.
47 *
48 * --Referenced Types--
49 * The "types": [] list may contain a list of types that are common to the
50 * current api module. Each type should have an "id" member ("id": "Tab").
51 * These types can be referenced from a schema with "$ref": "<idName>".
52 * i.e.
53 *
54 * ...
55 * type: "function",
56 * parameters: [
57 * {$ref: "BookmarkTreeNode", name: "node"}
58 * ]
59 *
60 * WARNING: Do not use these referenced types in module function parameters.
61 * They are not yet properly validated. They are currently safe to use in
62 * callback parameters and event parameters.
63 *
64 * TODO(rafaelw): Validate callback arguments in debug and unittests
65 * TODO(rafaelw): Validate event arguments in debug and unittests
66 * TODO(rafaelw): Support $ref for json_schema validation.
67 */
68
69 [ 1 [
70 /**
71 * chrome.self
72 */
73 { 2 {
74 namespace: "self", 3 "namespace": "self",
75 types: [ 4 "types": [
76 { 5 {
77 id: "HTMLWindow", 6 "id": "HTMLWindow",
78 type: "object" 7 "type": "object"
79 } 8 }
80 ], 9 ],
81 functions: [ 10 "functions": [
82 { 11 {
83 name: "getViews", 12 "name": "getViews",
84 type: "function", 13 "type": "function",
85 description: "Returns an array of the global JavaScript objects for each of the views running inside the current extension. This includes toolstrips, ba ckground pages, and tabs.", 14 "description": "Returns an array of the global JavaScript objects for ea ch of the views running inside the current extension. This includes toolstrips, background pages, and tabs.",
86 parameters: [], 15 "parameters": [],
87 returns: { 16 "returns": {
88 type: "array", 17 "type": "array",
89 description: "Array of HTMLWindow objects", 18 "description": "Array of HTMLWindow objects",
90 items: { $ref: "HTMLWindow" } 19 "items": { "$ref": "HTMLWindow" }
91 } 20 }
92 }, 21 }
93 ], 22 ],
94 events: [] 23 "events": []
95 }, 24 },
96
97 /**
98 * chrome.windows
99 */
100 { 25 {
101 namespace: "windows", 26 "namespace": "windows",
102 types: [], 27 "types": [],
103 functions: [ 28 "functions": [
104 { 29 {
105 name: "get", 30 "name": "get",
106 type: "function", 31 "type": "function",
107 description: "", 32 "description": "",
108 parameters: [ 33 "parameters": [
109 {type: "integer", name: "windowId", minimum: 0}, 34 {"type": "integer", "name": "windowId", "minimum": 0},
110 {type: "function", name: "callback"} 35 {"type": "function", "name": "callback"}
111 ] 36 ]
112 }, 37 },
113 { 38 {
114 name: "getCurrent", 39 "name": "getCurrent",
115 type: "function", 40 "type": "function",
116 description: "", 41 "description": "",
117 parameters: [ 42 "parameters": [
118 {type: "function", name: "callback"} 43 {"type": "function", "name": "callback"}
119 ] 44 ]
120 }, 45 },
121 { 46 {
122 name: "getLastFocused", 47 "name": "getLastFocused",
123 type: "function", 48 "type": "function",
124 description: "", 49 "description": "",
125 parameters: [ 50 "parameters": [
126 {type: "function", name: "callback"} 51 {"type": "function", "name": "callback"}
127 ] 52 ]
128 }, 53 },
129 { 54 {
130 name: "getAll", 55 "name": "getAll",
131 type: "function", 56 "type": "function",
132 description: "", 57 "description": "",
133 parameters: [ 58 "parameters": [
134 {type: "boolean", name: "populate", optional: true}, 59 {"type": "boolean", "name": "populate", "optional": true},
135 {type: "function", name: "callback"} 60 {"type": "function", "name": "callback"}
136 ] 61 ]
137 }, 62 },
138 { 63 {
139 name: "create", 64 "name": "create",
140 type: "function", 65 "type": "function",
141 description: "", 66 "description": "",
142 parameters: [ 67 "parameters": [
143 { 68 {
144 type: "object", 69 "type": "object",
145 name: "CreateData", 70 "name": "CreateData",
146 properties: { 71 "properties": {
147 url: {type: "string", optional: true}, 72 "url": {"type": "string", "optional": true},
148 left: {type: "integer", optional: true}, 73 "left": {"type": "integer", "optional": true},
149 top: {type: "integer", optional: true}, 74 "top": {"type": "integer", "optional": true},
150 width: {type: "integer", minimum: 0, optional: true}, 75 "width": {"type": "integer", "minimum": 0, "optional": true},
151 height: {type: "integer", minimum: 0, optional: true} 76 "height": {"type": "integer", "minimum": 0, "optional": true}
152 }, 77 },
153 optional: true 78 "optional": true
154 }, 79 },
155 {type: "function", name: "callback", optional: true} 80 {"type": "function", "name": "callback", "optional": true}
156 ] 81 ]
157 }, 82 },
158 { 83 {
159 name: "update", 84 "name": "update",
160 type: "function", 85 "type": "function",
161 description: "", 86 "description": "",
162 parameters: [ 87 "parameters": [
163 {type: "integer", name: "windowId", minimum: 0}, 88 {"type": "integer", "name": "windowId", "minimum": 0},
164 { 89 {
165 type: "object", 90 "type": "object",
166 name: "UpdateInfo", 91 "name": "UpdateInfo",
167 properties: { 92 "properties": {
168 left: {type: "integer", optional: true}, 93 "left": {"type": "integer", "optional": true},
169 top: {type: "integer", optional: true}, 94 "top": {"type": "integer", "optional": true},
170 width: {type: "integer", minimum: 0, optional: true}, 95 "width": {"type": "integer", "minimum": 0, "optional": true},
171 height: {type: "integer", minimum: 0, optional: true} 96 "height": {"type": "integer", "minimum": 0, "optional": true}
172 }, 97 }
173 }, 98 },
174 {type: "function", name: "callback", optional: true} 99 {"type": "function", "name": "callback", "optional": true}
175 ] 100 ]
176 }, 101 },
177 { 102 {
178 name: "remove", 103 "name": "remove",
179 type: "function", 104 "type": "function",
180 description: "", 105 "description": "",
181 parameters: [ 106 "parameters": [
182 {type: "integer", name: "windowId", minimum: 0}, 107 {"type": "integer", "name": "windowId", "minimum": 0},
183 {type: "function", name: "callback", optional: true} 108 {"type": "function", "name": "callback", "optional": true}
184 ] 109 ]
185 }, 110 }
186 ], 111 ],
187 events: [ 112 "events": [
188 { 113 {
189 name: "onCreated", 114 "name": "onCreated",
190 type: "function", 115 "type": "function",
191 description: "", 116 "description": "",
192 parameters: [ 117 "parameters": [
193 {type: "integer", name: "windowId", minimum: 0} 118 {"type": "integer", "name": "windowId", "minimum": 0}
194 ] 119 ]
195 }, 120 },
196 { 121 {
197 name: "onRemoved", 122 "name": "onRemoved",
198 type: "function", 123 "type": "function",
199 description: "", 124 "description": "",
200 parameters: [ 125 "parameters": [
201 {type: "integer", name: "windowId", minimum: 0} 126 {"type": "integer", "name": "windowId", "minimum": 0}
202 ] 127 ]
203 }, 128 },
204 { 129 {
205 name: "onFocusChanged", 130 "name": "onFocusChanged",
206 type: "function", 131 "type": "function",
207 description: "", 132 "description": "",
208 parameters: [ 133 "parameters": [
209 {type: "integer", name: "windowId", minimum: 0} 134 {"type": "integer", "name": "windowId", "minimum": 0}
210 ] 135 ]
211 } 136 }
212 ] 137 ]
213 }, 138 },
214
215 /**
216 * chrome.tabs
217 */
218 { 139 {
219 namespace: "tabs", 140 "namespace": "tabs",
220 types: [ 141 "types": [
221 { 142 {
222 id: "Tab", 143 "id": "Tab",
223 type: "object", 144 "type": "object",
224 properties: { 145 "properties": {
225 id: {type: "integer", minimum: 0}, 146 "id": {"type": "integer", "minimum": 0},
226 index: {type: "integer", minimum: 0}, 147 "index": {"type": "integer", "minimum": 0},
227 windowId: {type: "integer", minimum: 0}, 148 "windowId": {"type": "integer", "minimum": 0},
228 selected: {type: "boolean"}, 149 "selected": {"type": "boolean"},
229 url: {type: "string"}, 150 "url": {"type": "string"},
230 title: {type: "string", optional: true}, 151 "title": {"type": "string", "optional": true},
231 favIconUrl: {type: "string", optional: true} 152 "favIconUrl": {"type": "string", "optional": true}
232 } 153 }
233 }, 154 },
234 { 155 {
235 id: "Port", 156 "id": "Port",
236 type: "object", 157 "type": "object",
237 properties: { 158 "properties": {
238 name: {type: "string"}, 159 "name": {"type": "string"},
239 onDisconnect: {type: "object"}, 160 "onDisconnect": {"type": "object"},
240 onMessage: {type: "object"} 161 "onMessage": {"type": "object"}
241 } 162 }
242 } 163 }
243 ], 164 ],
244 functions: [ 165 "functions": [
245 { 166 {
246 name: "get", 167 "name": "get",
247 type: "function", 168 "type": "function",
248 description: "", 169 "description": "",
249 parameters: [ 170 "parameters": [
250 {type: "integer", name: "tabId", minimum: 0}, 171 {"type": "integer", "name": "tabId", "minimum": 0},
251 { 172 {
252 type: "function", 173 "type": "function",
253 name: "callback", 174 "name": "callback",
254 parameters: [ 175 "parameters": [
255 {name: "tab", $ref: "Tab"} 176 {"name": "tab", "$ref": "Tab"}
256 ] 177 ]
257 } 178 }
258 ] 179 ]
259 }, 180 },
260 { 181 {
261 name: "connect", 182 "name": "connect",
262 type: "function", 183 "type": "function",
263 description: "", 184 "description": "",
264 parameters: [ 185 "parameters": [
265 {type: "integer", name: "tabId", optional: true, minimum: 0}, 186 {"type": "integer", "name": "tabId", "optional": true, "minimum": 0},
266 {type: "string", name: "name", optional: true} 187 {"type": "string", "name": "name", "optional": true}
267 ], 188 ],
268 returns: { 189 "returns": {
269 name: "Port", 190 "name": "Port",
270 $ref: "Port" 191 "$ref": "Port"
271 } 192 }
272 }, 193 },
273 { 194 {
274 name: "getSelected", 195 "name": "getSelected",
275 type: "function", 196 "type": "function",
276 description: "", 197 "description": "",
277 parameters: [ 198 "parameters": [
278 {type: "integer", name: "windowId", minimum: 0, optional: true}, 199 {"type": "integer", "name": "windowId", "minimum": 0, "optional": true },
279 { 200 {
280 type: "function", 201 "type": "function",
281 name: "callback", 202 "name": "callback",
282 parameters: [ 203 "parameters": [
283 {name: "tab", $ref: "Tab"} 204 {"name": "tab", "$ref": "Tab"}
284 ] 205 ]
285 } 206 }
286 ] 207 ]
287 }, 208 },
288 { 209 {
289 name: "getAllInWindow", 210 "name": "getAllInWindow",
290 type: "function", 211 "type": "function",
291 description: "", 212 "description": "",
292 parameters: [ 213 "parameters": [
293 {type: "integer", name: "windowId", minimum: 0, optional: true}, 214 {"type": "integer", "name": "windowId", "minimum": 0, "optional": true },
294 {type: "function", name: "callback"} 215 {"type": "function", "name": "callback"}
295 ] 216 ]
296 }, 217 },
297 { 218 {
298 name: "create", 219 "name": "create",
299 type: "function", 220 "type": "function",
300 description: "", 221 "description": "",
301 parameters: [ 222 "parameters": [
302 { 223 {
303 type: "object", 224 "type": "object",
304 name: "CreateProperties", 225 "name": "CreateProperties",
305 properties: { 226 "properties": {
306 windowId: {type: "integer", minimum: 0, optional: true}, 227 "windowId": {"type": "integer", "minimum": 0, "optional": true},
307 index: {type: "integer", minimum: 0, optional: true}, 228 "index": {"type": "integer", "minimum": 0, "optional": true},
308 url: {type: "string", optional: true}, 229 "url": {"type": "string", "optional": true},
309 selected: {type: "boolean", optional: true} 230 "selected": {"type": "boolean", "optional": true}
310 } 231 }
311 }, 232 },
312 { 233 {
313 type: "function", 234 "type": "function",
314 name: "callback", 235 "name": "callback",
315 optional: true, 236 "optional": true,
316 parameters: [ 237 "parameters": [
317 {name: "tab", $ref: "Tab"} 238 {"name": "tab", "$ref": "Tab"}
318 ] 239 ]
319 } 240 }
320 ] 241 ]
321 }, 242 },
322 { 243 {
323 name: "update", 244 "name": "update",
324 type: "function", 245 "type": "function",
325 description: "", 246 "description": "",
326 parameters: [ 247 "parameters": [
327 {type: "integer", name: "tabId", minimum: 0}, 248 {"type": "integer", "name": "tabId", "minimum": 0},
328 { 249 {
329 type: "object", 250 "type": "object",
330 name: "UpdateProperties", 251 "name": "UpdateProperties",
331 properties: { 252 "properties": {
332 url: {type: "string", optional: true}, 253 "url": {"type": "string", "optional": true},
333 selected: {type: "boolean", optional: true} 254 "selected": {"type": "boolean", "optional": true}
334 } 255 }
335 }, 256 },
336 {type: "function", name: "callback", optional: true, parameters: []} 257 {"type": "function", "name": "callback", "optional": true, "parameters ": []}
337 ] 258 ]
338 }, 259 },
339 { 260 {
340 name: "move", 261 "name": "move",
341 type: "function", 262 "type": "function",
342 description: "", 263 "description": "",
343 parameters: [ 264 "parameters": [
344 {type: "integer", name: "tabId", minimum: 0}, 265 {"type": "integer", "name": "tabId", "minimum": 0},
345 { 266 {
346 type: "object", 267 "type": "object",
347 name: "MoveProperties", 268 "name": "MoveProperties",
348 properties: { 269 "properties": {
349 windowId: {type: "integer", minimum: 0, optional: true}, 270 "windowId": {"type": "integer", "minimum": 0, "optional": true},
350 index: {type: "integer", minimum: 0} 271 "index": {"type": "integer", "minimum": 0}
351 } 272 }
352 }, 273 },
353 {type: "function", name: "callback", optional: true, parameters: []} 274 {"type": "function", "name": "callback", "optional": true, "parameters ": []}
354 ] 275 ]
355 }, 276 },
356 { 277 {
357 name: "remove", 278 "name": "remove",
358 type: "function", 279 "type": "function",
359 description: "", 280 "description": "",
360 parameters: [ 281 "parameters": [
361 {type: "integer", name: "tabId", minimum: 0, optional: true}, 282 {"type": "integer", "name": "tabId", "minimum": 0, "optional": true},
362 {type: "function", name: "callback", optional: true, parameters: []} 283 {"type": "function", "name": "callback", "optional": true, "parameters ": []}
363 ] 284 ]
364 }, 285 },
365 { 286 {
366 name: "detectLanguage", 287 "name": "detectLanguage",
367 type: "function", 288 "type": "function",
368 description: "detect language of tab.", 289 "description": "detect language of tab.",
369 parameters: [ 290 "parameters": [
370 {type: "integer", name: "tabId", minimum: 0, optional: true}, 291 {"type": "integer", "name": "tabId", "minimum": 0, "optional": true},
371 { 292 {
372 type: "function", 293 "type": "function",
373 name: "callback", 294 "name": "callback",
374 parameters: [ 295 "parameters": [
375 {type: "string", name: "language"} 296 {"type": "string", "name": "language"}
376 ] 297 ]
377 } 298 }
378 ] 299 ]
379 } 300 }
380 ], 301 ],
381 events: [ 302 "events": [
382 { 303 {
383 name: "onCreated", 304 "name": "onCreated",
384 type: "function", 305 "type": "function",
385 description: "", 306 "description": "",
386 parameters: [ 307 "parameters": [
387 {$ref: "Tab", name: "tab"} 308 {"$ref": "Tab", "name": "tab"}
388 ] 309 ]
389 }, 310 },
390 { 311 {
391 name: "onUpdated", 312 "name": "onUpdated",
392 type: "function", 313 "type": "function",
393 description: "", 314 "description": "",
394 parameters: [ 315 "parameters": [
395 {type: "integer", name: "tabId", minimum: 0}, 316 {"type": "integer", "name": "tabId", "minimum": 0},
396 { 317 {
397 type: "object", 318 "type": "object",
398 name: "ChangedProps", 319 "name": "ChangedProps",
399 properties: { 320 "properties": {
400 tabId: {type: "integer", name: "tabId", minimum: 0}, 321 "tabId": {"type": "integer", "name": "tabId", "minimum": 0},
401 status: {type: "string"}, 322 "status": {"type": "string"},
402 url: {type: "string", optional: true} 323 "url": {"type": "string", "optional": true}
403 } 324 }
404 } 325 }
405 ] 326 ]
406 }, 327 },
407 { 328 {
408 name: "onMoved", 329 "name": "onMoved",
409 type: "function", 330 "type": "function",
410 description: "", 331 "description": "",
411 parameters: [ 332 "parameters": [
412 {type: "integer", name: "tabId", minimum: 0}, 333 {"type": "integer", "name": "tabId", "minimum": 0},
413 { 334 {
414 type: "object", 335 "type": "object",
415 name: "MoveInfo", 336 "name": "MoveInfo",
416 properties: { 337 "properties": {
417 windowId: {type: "integer", minimum: 0}, 338 "windowId": {"type": "integer", "minimum": 0},
418 fromIndex: {type: "integer", minimum: 0}, 339 "fromIndex": {"type": "integer", "minimum": 0},
419 toIndex: {type: "integer", minimum: 0} 340 "toIndex": {"type": "integer", "minimum": 0}
420 } 341 }
421 } 342 }
422 ] 343 ]
423 }, 344 },
424 { 345 {
425 name: "onSelectionChanged", 346 "name": "onSelectionChanged",
426 type: "function", 347 "type": "function",
427 description: "", 348 "description": "",
428 parameters: [ 349 "parameters": [
429 {type: "integer", name: "tabId", minimum: 0}, 350 {"type": "integer", "name": "tabId", "minimum": 0},
430 { 351 {
431 type: "object", name: "SelectInfo", 352 "type": "object", "name": "SelectInfo",
432 properties: { 353 "properties": {
433 windowId: {type: "integer", minimum: 0}, 354 "windowId": {"type": "integer", "minimum": 0}
434 } 355 }
435 } 356 }
436 ] 357 ]
437 }, 358 },
438 { 359 {
439 name: "onAttached", 360 "name": "onAttached",
440 type: "function", 361 "type": "function",
441 description: "", 362 "description": "",
442 parameters: [ 363 "parameters": [
443 {type: "integer", name: "tabId", minimum: 0}, 364 {"type": "integer", "name": "tabId", "minimum": 0},
444 { 365 {
445 type: "object", 366 "type": "object",
446 name: "AttachInfo", 367 "name": "AttachInfo",
447 properties: { 368 "properties": {
448 newWindowId: {type: "integer", minimum: 0}, 369 "newWindowId": {"type": "integer", "minimum": 0},
449 newPosition: {type: "integer", minimum: 0} 370 "newPosition": {"type": "integer", "minimum": 0}
450 } 371 }
451 } 372 }
452 ] 373 ]
453 }, 374 },
454 { 375 {
455 name: "onDetached", 376 "name": "onDetached",
456 type: "function", 377 "type": "function",
457 description: "", 378 "description": "",
458 parameters: [ 379 "parameters": [
459 {type: "integer", name: "tabId", minimum: 0}, 380 {"type": "integer", "name": "tabId", "minimum": 0},
460 { 381 {
461 type: "object", 382 "type": "object",
462 name: "DetachInfo", 383 "name": "DetachInfo",
463 properties: { 384 "properties": {
464 oldWindowId: {type: "integer", minimum: 0}, 385 "oldWindowId": {"type": "integer", "minimum": 0},
465 oldPosition: {type: "integer", minimum: 0} 386 "oldPosition": {"type": "integer", "minimum": 0}
466 } 387 }
467 } 388 }
468 ] 389 ]
469 }, 390 },
470 { 391 {
471 name: "onRemoved", 392 "name": "onRemoved",
472 type: "function", 393 "type": "function",
473 description: "", 394 "description": "",
474 parameters: [ 395 "parameters": [
475 {type: "integer", name: "tabId", minimum: 0} 396 {"type": "integer", "name": "tabId", "minimum": 0}
476 ] 397 ]
477 } 398 }
478 ] 399 ]
479 }, 400 },
480
481 /**
482 * chrome.pageActions
483 */
484 { 401 {
485 namespace: "pageActions", 402 "namespace": "pageActions",
486 types: [], 403 "types": [],
487 functions: [ 404 "functions": [
488 { 405 {
489 name: "enableForTab", 406 "name": "enableForTab",
490 type: "function", 407 "type": "function",
491 description: "", 408 "description": "",
492 parameters: [ 409 "parameters": [
493 {type: "string", name: "pageActionId"}, 410 {"type": "string", "name": "pageActionId"},
494 { 411 {
495 type: "object", 412 "type": "object",
496 name: "action", 413 "name": "action",
497 properties: { 414 "properties": {
498 tabId: {type: "integer", minimum: 0}, 415 "tabId": {"type": "integer", "minimum": 0},
499 url: {type: "string"}, 416 "url": {"type": "string"},
500 title: {type: "string", optional: true}, 417 "title": {"type": "string", "optional": true},
501 iconId: {type: "integer", minimum: 0, optional: true} 418 "iconId": {"type": "integer", "minimum": 0, "optional": true}
502 }, 419 },
503 optional: false 420 "optional": false
504 } 421 }
505 ] 422 ]
506 }, 423 },
507 { 424 {
508 name: "disableForTab", 425 "name": "disableForTab",
509 type: "function", 426 "type": "function",
510 description: "", 427 "description": "",
511 parameters: [ 428 "parameters": [
512 {type: "string", name: "pageActionId"}, 429 {"type": "string", "name": "pageActionId"},
513 { 430 {
514 type: "object", 431 "type": "object",
515 name: "action", 432 "name": "action",
516 properties: { 433 "properties": {
517 tabId: {type: "integer", minimum: 0}, 434 "tabId": {"type": "integer", "minimum": 0},
518 url: {type: "string"} 435 "url": {"type": "string"}
519 }, 436 },
520 optional: false 437 "optional": false
521 } 438 }
522 ] 439 ]
523 } 440 }
524 ], 441 ],
525 events: [ 442 "events": [
526 ] 443 ]
527 }, 444 },
528
529 /**
530 * chrome.bookmarks
531 */
532 { 445 {
533 namespace: "bookmarks", 446 "namespace": "bookmarks",
534 types: [], 447 "types": [],
535 functions: [ 448 "functions": [
536 { 449 {
537 name: "get", 450 "name": "get",
538 type: "function", 451 "type": "function",
539 description: "", 452 "description": "",
540 parameters: [ 453 "parameters": [
541 { 454 {
542 name: "idOrIdList", 455 "name": "idOrIdList",
543 choice : [ 456 "choice": [
544 {type: "string"}, 457 {"type": "string"},
545 {type: "array", items: {type: "string"}, minItems: 1} 458 {"type": "array", "items": {"type": "string"}, "minItems": 1}
546 ] 459 ]
547 }, 460 },
548 {type: "function", name: "callback"} 461 {"type": "function", "name": "callback"}
549 ] 462 ]
550 }, 463 },
551 { 464 {
552 name: "getChildren", 465 "name": "getChildren",
553 type: "function", 466 "type": "function",
554 description: "", 467 "description": "",
555 parameters: [ 468 "parameters": [
556 {type: "string", name: "id"}, 469 {"type": "string", "name": "id"},
557 {type: "function", name: "callback"} 470 {"type": "function", "name": "callback"}
558 ] 471 ]
559 }, 472 },
560 { 473 {
561 name: "getTree", 474 "name": "getTree",
562 type: "function", 475 "type": "function",
563 description: "", 476 "description": "",
564 parameters: [ 477 "parameters": [
565 {type: "function", name: "callback"} 478 {"type": "function", "name": "callback"}
566 ] 479 ]
567 }, 480 },
568 { 481 {
569 name: "search", 482 "name": "search",
570 type: "function", 483 "type": "function",
571 description: "", 484 "description": "",
572 parameters: [ 485 "parameters": [
573 {type: "string", name: "query"}, 486 {"type": "string", "name": "query"},
574 {type: "function", name: "callback"} 487 {"type": "function", "name": "callback"}
575 ] 488 ]
576 }, 489 },
577 { 490 {
578 name: "create", 491 "name": "create",
579 type: "function", 492 "type": "function",
580 description: "", 493 "description": "",
581 parameters: [ 494 "parameters": [
582 { 495 {
583 type: "object", 496 "type": "object",
584 name: "bookmark", 497 "name": "bookmark",
585 properties: { 498 "properties": {
586 parentId: {type: "string"}, 499 "parentId": {"type": "string"},
587 index: {type: "integer", minimum: 0, optional: true}, 500 "index": {"type": "integer", "minimum": 0, "optional": true},
588 title: {type: "string", optional: true}, 501 "title": {"type": "string", "optional": true},
589 url: {type: "string", optional: true}, 502 "url": {"type": "string", "optional": true}
590 } 503 }
591 }, 504 },
592 {type: "function", name: "callback", optional: true} 505 {"type": "function", "name": "callback", "optional": true}
593 ] 506 ]
594 }, 507 },
595 { 508 {
596 name: "move", 509 "name": "move",
597 type: "function", 510 "type": "function",
598 description: "", 511 "description": "",
599 parameters: [ 512 "parameters": [
600 {type: "string", name: "id"}, 513 {"type": "string", "name": "id"},
601 { 514 {
602 type: "object", 515 "type": "object",
603 name: "destination", 516 "name": "destination",
604 properties: { 517 "properties": {
605 parentId: {type: "string"}, 518 "parentId": {"type": "string"},
606 index: {type: "integer", minimum: 0, optional: true} 519 "index": {"type": "integer", "minimum": 0, "optional": true}
607 } 520 }
608 }, 521 },
609 {type: "function", name: "callback", optional: true} 522 {"type": "function", "name": "callback", "optional": true}
610 ] 523 ]
611 }, 524 },
612 { 525 {
613 name: "update", 526 "name": "update",
614 type: "function", 527 "type": "function",
615 description: "", 528 "description": "",
616 parameters: [ 529 "parameters": [
617 {type: "string", name: "id"}, 530 {"type": "string", "name": "id"},
618 { 531 {
619 type: "object", 532 "type": "object",
620 name: "changes", 533 "name": "changes",
621 properties: { 534 "properties": {
622 title: {type: "string", optional: true} 535 "title": {"type": "string", "optional": true}
623 } 536 }
624 }, 537 },
625 {type: "function", name: "callback", optional: true} 538 {"type": "function", "name": "callback", "optional": true}
626 ] 539 ]
627 }, 540 },
628 { 541 {
629 name: "remove", 542 "name": "remove",
630 type: "function", 543 "type": "function",
631 description: "", 544 "description": "",
632 parameters: [ 545 "parameters": [
633 {type: "string", name: "id"}, 546 {"type": "string", "name": "id"},
634 {type: "function", name: "callback", optional: true} 547 {"type": "function", "name": "callback", "optional": true}
635 ] 548 ]
636 }, 549 },
637 { 550 {
638 name: "removeTree", 551 "name": "removeTree",
639 type: "function", 552 "type": "function",
640 description: "", 553 "description": "",
641 parameters: [ 554 "parameters": [
642 {type: "string", name: "id"}, 555 {"type": "string", "name": "id"},
643 {type: "function", name: "callback", optional: true} 556 {"type": "function", "name": "callback", "optional": true}
644 ] 557 ]
645 }, 558 }
646 ], 559 ],
647 events: [ 560 "events": [
648 { 561 {
649 name: "onAdded", 562 "name": "onAdded",
650 type: "function", 563 "type": "function",
651 description: "", 564 "description": "",
652 parameters: [ 565 "parameters": [
653 {type: "string", name: "id"}, 566 {"type": "string", "name": "id"},
654 { 567 {
655 type: "object", 568 "type": "object",
656 name: "bookmark", 569 "name": "bookmark"
657 } 570 }
658 ] 571 ]
659 }, 572 },
660 { 573 {
661 name: "onRemoved", 574 "name": "onRemoved",
662 type: "function", 575 "type": "function",
663 description: "", 576 "description": "",
664 parameters: [ 577 "parameters": [
665 {type: "string", name: "id"}, 578 {"type": "string", "name": "id"},
666 { 579 {
667 type: "object", 580 "type": "object",
668 name: "RemoveInfo", 581 "name": "RemoveInfo"
669 } 582 }
670 ] 583 ]
671 }, 584 },
672 { 585 {
673 name: "onChanged", 586 "name": "onChanged",
674 type: "function", 587 "type": "function",
675 description: "", 588 "description": "",
676 parameters: [ 589 "parameters": [
677 {type: "string", name: "id"}, 590 {"type": "string", "name": "id"},
678 { 591 {
679 type: "object", 592 "type": "object",
680 name: "ChangeInfo", 593 "name": "ChangeInfo"
681 } 594 }
682 ] 595 ]
683 }, 596 },
684 { 597 {
685 name: "onMoved", 598 "name": "onMoved",
686 type: "function", 599 "type": "function",
687 description: "", 600 "description": "",
688 parameters: [ 601 "parameters": [
689 {type: "string", name: "id"}, 602 {"type": "string", "name": "id"},
690 { 603 {
691 type: "object", 604 "type": "object",
692 name: "MoveInfo", 605 "name": "MoveInfo"
693 } 606 }
694 ] 607 ]
695 }, 608 },
696 { 609 {
697 name: "onChildrenReordered", 610 "name": "onChildrenReordered",
698 type: "function", 611 "type": "function",
699 description: "", 612 "description": "",
700 parameters: [ 613 "parameters": [
701 {type: "string", name: "id"}, 614 {"type": "string", "name": "id"},
702 { 615 {
703 type: "object", 616 "type": "object",
704 name: "childIds", 617 "name": "childIds"
705 } 618 }
706 ] 619 ]
707 } 620 }
708 ] 621 ]
709 } 622 }
710 ] 623 ]
OLDNEW
« no previous file with comments | « chrome/common/extensions/PRESUBMIT.PY ('k') | chrome/common/extensions/docs/api_index.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698