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

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: fixed optional properties 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 "compile": true,
4 "dependencies": [ "extension", "windows" ], 5 "dependencies": [ "extension", "windows" ],
5 "types": [ 6 "types": [
6 { 7 {
7 "id": "Tab", 8 "id": "Tab",
8 "type": "object", 9 "type": "object",
9 "properties": { 10 "properties": {
10 "id": {"type": "integer", "minimum": 0, "description": "The ID of the tab. Tab IDs are unique within a browser session."}, 11 "id": {"type": "integer", "minimum": 0, "description": "The ID of the tab. Tab IDs are unique within a browser session."},
11 "index": {"type": "integer", "minimum": 0, "description": "The zero-ba sed index of the tab within its window."}, 12 "index": {"type": "integer", "minimum": 0, "description": "The zero-ba sed index of the tab within its window."},
12 "windowId": {"type": "integer", "minimum": 0, "description": "The ID o f the window the tab is contained within."}, 13 "windowId": {"type": "integer", "minimum": 0, "description": "The ID o f the window the tab is contained within."},
13 "openerTabId": {"type": "integer", "minimum": 0, "optional": true, "de scription": "The ID of the tab that opened this tab, if any. This will only be p resent if the opener tab still exists."}, 14 "openerTabId": {"type": "integer", "minimum": 0, "optional": true, "de scription": "The ID of the tab that opened this tab, if any. This will only be p resent if the opener tab still exists."},
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 "name": "tab", 57 "name": "tab",
57 "$ref": "Tab", 58 "$ref": "Tab",
58 "optional": true 59 "optional": true
59 } 60 }
60 ] 61 ]
61 } 62 }
62 ] 63 ]
63 }, 64 },
64 { 65 {
65 "name": "connect", 66 "name": "connect",
67 "compile": false,
66 "type": "function", 68 "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>.", 69 "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": [ 70 "parameters": [
69 { 71 {
70 "type": "integer", 72 "type": "integer",
71 "name": "tabId", 73 "name": "tabId",
72 "minimum": 0 74 "minimum": 0
73 }, 75 },
74 { 76 {
75 "type": "object", 77 "type": "object",
76 "name": "connectInfo", 78 "name": "connectInfo",
77 "properties": { 79 "properties": {
78 "name": { "type": "string", "optional": true, "description": "Will be passed into onConnect for content scripts that are listening for the connect ion event." } 80 "name": { "type": "string", "optional": true, "description": "Will be passed into onConnect for content scripts that are listening for the connect ion event." }
79 }, 81 },
80 "optional": true 82 "optional": true
81 } 83 }
82 ], 84 ],
83 "returns": { 85 "returns": {
84 "$ref": "Port", 86 "$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. " 87 "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 } 88 }
87 }, 89 },
88 { 90 {
89 "name": "sendRequest", 91 "name": "sendRequest",
92 "compile": false,
90 "type": "function", 93 "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.", 94 "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": [ 95 "parameters": [
93 { 96 {
94 "type": "integer", 97 "type": "integer",
95 "name": "tabId", 98 "name": "tabId",
96 "minimum": 0 99 "minimum": 0
97 }, 100 },
98 { 101 {
99 "type": "any", 102 "type": "any",
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
827 "name": "removeInfo", 831 "name": "removeInfo",
828 "properties": { 832 "properties": {
829 "isWindowClosing": {"type": "boolean", "description": "True when t he tab is being closed because its window is being closed." } 833 "isWindowClosing": {"type": "boolean", "description": "True when t he tab is being closed because its window is being closed." }
830 } 834 }
831 } 835 }
832 ] 836 ]
833 } 837 }
834 ] 838 ]
835 } 839 }
836 ] 840 ]
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698