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

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

Issue 9309044: Supporting more APIs with json_schema_compiler (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rework 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
1 [ 1 [
2 { 2 {
3 "namespace": "tabs", 3 "namespace": "tabs",
4 "dependencies": [ "extension", "windows" ], 4 "dependencies": [ "extension", "windows" ],
5 "types": [ 5 "types": [
6 { 6 {
7 "id": "Tab", 7 "id": "Tab",
8 "type": "object", 8 "type": "object",
9 "properties": { 9 "properties": {
10 "id": {"type": "integer", "minimum": 0, "description": "The ID of the tab. Tab IDs are unique within a browser session."}, 10 "id": {"type": "integer", "minimum": 0, "description": "The ID of the tab. Tab IDs are unique within a browser session."},
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 "name": "tab", 56 "name": "tab",
57 "$ref": "Tab", 57 "$ref": "Tab",
58 "optional": true 58 "optional": true
59 } 59 }
60 ] 60 ]
61 } 61 }
62 ] 62 ]
63 }, 63 },
64 { 64 {
65 "name": "connect", 65 "name": "connect",
66 "nocompile": true,
66 "type": "function", 67 "type": "function",
67 "description": "Connects to the content script(s) in the specified tab. The <a href='extension.html#event-onConnect'>chrome.extension.onConnect</a> even t is fired in each content script running in the specified tab for the current e xtension. For more details, see <a href='content_scripts.html#messaging'>Content Script Messaging</a>.", 68 "description": "Connects to the content script(s) in the specified tab. The <a href='extension.html#event-onConnect'>chrome.extension.onConnect</a> even t is fired in each content script running in the specified tab for the current e xtension. For more details, see <a href='content_scripts.html#messaging'>Content Script Messaging</a>.",
68 "parameters": [ 69 "parameters": [
69 { 70 {
70 "type": "integer", 71 "type": "integer",
71 "name": "tabId", 72 "name": "tabId",
72 "minimum": 0 73 "minimum": 0
73 }, 74 },
74 { 75 {
75 "type": "object", 76 "type": "object",
76 "name": "connectInfo", 77 "name": "connectInfo",
77 "properties": { 78 "properties": {
78 "name": { "type": "string", "optional": true, "description": "Will be passed into onConnect for content scripts that are listening for the connect ion event." } 79 "name": { "type": "string", "optional": true, "description": "Will be passed into onConnect for content scripts that are listening for the connect ion event." }
79 }, 80 },
80 "optional": true 81 "optional": true
81 } 82 }
82 ], 83 ],
83 "returns": { 84 "returns": {
84 "$ref": "Port", 85 "$ref": "Port",
85 "description": "A port that can be used to communicate with the conten t scripts running in the specified tab. The port's <a href='extension.html#type- Port'>onDisconnect</a> event is fired if the tab closes or does not exist. " 86 "description": "A port that can be used to communicate with the conten t scripts running in the specified tab. The port's <a href='extension.html#type- Port'>onDisconnect</a> event is fired if the tab closes or does not exist. "
86 } 87 }
87 }, 88 },
88 { 89 {
89 "name": "sendRequest", 90 "name": "sendRequest",
91 "nocompile": true,
90 "type": "function", 92 "type": "function",
91 "description": "Sends a single request to the content script(s) in the s pecified tab, with an optional callback to run when a response is sent back. Th e <a href='extension.html#event-onRequest'>chrome.extension.onRequest</a> event is fired in each content script running in the specified tab for the current ext ension.", 93 "description": "Sends a single request to the content script(s) in the s pecified tab, with an optional callback to run when a response is sent back. Th e <a href='extension.html#event-onRequest'>chrome.extension.onRequest</a> event is fired in each content script running in the specified tab for the current ext ension.",
92 "parameters": [ 94 "parameters": [
93 { 95 {
94 "type": "integer", 96 "type": "integer",
95 "name": "tabId", 97 "name": "tabId",
96 "minimum": 0 98 "minimum": 0
97 }, 99 },
98 { 100 {
99 "type": "any", 101 "type": "any",
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 "$ref": "Tab" 294 "$ref": "Tab"
293 } 295 }
294 } 296 }
295 ] 297 ]
296 } 298 }
297 ] 299 ]
298 }, 300 },
299 { 301 {
300 "name": "highlight", 302 "name": "highlight",
301 "type": "function", 303 "type": "function",
304 "nocompile": true,
302 "description": "Highlights the given tabs.", 305 "description": "Highlights the given tabs.",
303 "parameters": [ 306 "parameters": [
304 { 307 {
305 "type": "object", 308 "type": "object",
306 "name": "highlightInfo", 309 "name": "highlightInfo",
307 "properties": { 310 "properties": {
308 "windowId": { 311 "windowId": {
309 "type": "integer", 312 "type": "integer",
310 "description": "The window that contains the tabs.", 313 "description": "The window that contains the tabs.",
311 "minimum": -2 314 "minimum": -2
(...skipping 30 matching lines...) Expand all
342 "name": "tabId", 345 "name": "tabId",
343 "minimum": 0, 346 "minimum": 0,
344 "optional": true, 347 "optional": true,
345 "description": "Defaults to the selected tab of the <a href='windows .html#current-window'>current window</a>." 348 "description": "Defaults to the selected tab of the <a href='windows .html#current-window'>current window</a>."
346 }, 349 },
347 { 350 {
348 "type": "object", 351 "type": "object",
349 "name": "updateProperties", 352 "name": "updateProperties",
350 "properties": { 353 "properties": {
351 "url": { 354 "url": {
355 "type": "string",
352 "optional": true, 356 "optional": true,
353 "description": "A URL to navigate the tab to." 357 "description": "A URL to navigate the tab to."
354 }, 358 },
355 "active": { 359 "active": {
356 "type": "boolean", 360 "type": "boolean",
357 "optional": true, 361 "optional": true,
358 "description": "Whether the tab should be active." 362 "description": "Whether the tab should be active."
359 }, 363 },
360 "highlighted": { 364 "highlighted": {
361 "type": "boolean", 365 "type": "boolean",
(...skipping 29 matching lines...) Expand all
391 "$ref": "Tab", 395 "$ref": "Tab",
392 "optional": true, 396 "optional": true,
393 "description": "Details about the updated tab, or <code>null</co de> if the 'tabs' permission has not been requested." 397 "description": "Details about the updated tab, or <code>null</co de> if the 'tabs' permission has not been requested."
394 } 398 }
395 ] 399 ]
396 } 400 }
397 ] 401 ]
398 }, 402 },
399 { 403 {
400 "name": "move", 404 "name": "move",
405 "nocompile": true,
401 "type": "function", 406 "type": "function",
402 "description": "Moves one or more tabs to a new position within its wind ow, or to a new window. Note that tabs can only be moved to and from normal (win dow.type === \"normal\") windows.", 407 "description": "Moves one or more tabs to a new position within its wind ow, or to a new window. Note that tabs can only be moved to and from normal (win dow.type === \"normal\") windows.",
403 "parameters": [ 408 "parameters": [
404 { 409 {
405 "name": "tabIds", 410 "name": "tabIds",
406 "description": "The tab or list of tabs to move.", 411 "description": "The tab or list of tabs to move.",
407 "choices": [ 412 "choices": [
408 {"type": "integer", "minimum": 0}, 413 {"type": "integer", "minimum": 0},
409 {"type": "array", "items": {"type": "integer", "minimum": 0}} 414 {"type": "array", "items": {"type": "integer", "minimum": 0}}
410 ] 415 ]
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 "optional": true, 464 "optional": true,
460 "description": "Whether using any local cache. Default is false. " 465 "description": "Whether using any local cache. Default is false. "
461 } 466 }
462 } 467 }
463 }, 468 },
464 {"type": "function", "name": "callback", "optional": true, "parameters ": []} 469 {"type": "function", "name": "callback", "optional": true, "parameters ": []}
465 ] 470 ]
466 }, 471 },
467 { 472 {
468 "name": "remove", 473 "name": "remove",
474 "nocompile": true,
469 "type": "function", 475 "type": "function",
470 "description": "Closes one or more tabs. Note: This function can be used without requesting the 'tabs' permission in the manifest.", 476 "description": "Closes one or more tabs. Note: This function can be used without requesting the 'tabs' permission in the manifest.",
471 "parameters": [ 477 "parameters": [
472 { 478 {
473 "name": "tabIds", 479 "name": "tabIds",
474 "description": "The tab or list of tabs to close.", 480 "description": "The tab or list of tabs to close.",
475 "choices": [ 481 "choices": [
476 {"type": "integer", "minimum": 0}, 482 {"type": "integer", "minimum": 0},
477 {"type": "array", "items": {"type": "integer", "minimum": 0}} 483 {"type": "array", "items": {"type": "integer", "minimum": 0}}
478 ] 484 ]
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
827 "name": "removeInfo", 833 "name": "removeInfo",
828 "properties": { 834 "properties": {
829 "isWindowClosing": {"type": "boolean", "description": "True when t he tab is being closed because its window is being closed." } 835 "isWindowClosing": {"type": "boolean", "description": "True when t he tab is being closed because its window is being closed." }
830 } 836 }
831 } 837 }
832 ] 838 ]
833 } 839 }
834 ] 840 ]
835 } 841 }
836 ] 842 ]
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698