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

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

Issue 10697017: Tabs Extension: Implementation of tabs.duplicate api. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 { 6 {
7 "namespace": "tabs", 7 "namespace": "tabs",
8 "dependencies": [ "extension", "windows" ], 8 "dependencies": [ "extension", "windows" ],
9 "types": [ 9 "types": [
10 { 10 {
11 "id": "Tab", 11 "id": "Tab",
12 "type": "object", 12 "type": "object",
13 "properties": { 13 "properties": {
14 "id": {"type": "integer", "minimum": 0, "description": "The ID of the tab. Tab IDs are unique within a browser session."}, 14 "id": {"type": "integer", "minimum": 0, "description": "The ID of the tab. Tab IDs are unique within a browser session."},
15 "index": {"type": "integer", "minimum": 0, "description": "The zero-ba sed index of the tab within its window."}, 15 "index": {"type": "integer", "minimum": 0, "description": "The zero-ba sed index of the tab within its window."},
16 "windowId": {"type": "integer", "minimum": 0, "description": "The ID o f the window the tab is contained within."}, 16 "windowId": {"type": "integer", "minimum": 0, "description": "The ID o f the window the tab is contained within."},
17 "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."}, 17 "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."},
18 "selected": {"type": "boolean", "description": "Whether the tab is sel ected.", "nodoc": true}, 18 "selected": {"type": "boolean", "description": "Whether the tab is sel ected.", "nodoc": true},
19 "highlighted": {"type": "boolean", "description": "Whether the tab is highlighted."}, 19 "highlighted": {"type": "boolean", "description": "Whether the tab is highlighted."},
20 "active": {"type": "boolean", "description": "Whether the tab is activ e in its window."}, 20 "active": {"type": "boolean", "description": "Whether the tab is activ e in its window."},
21 "pinned": {"type": "boolean", "description": "Whether the tab is pinne d."}, 21 "pinned": {"type": "boolean", "description": "Whether the tab is pinne d."},
22 "url": {"type": "string", "description": "The URL the tab is displayin g."}, 22 "url": {"type": "string", "optional": true, "description": "The URL th e tab is displaying."},
23 "title": {"type": "string", "optional": true, "description": "The titl e of the tab. This may not be available if the tab is loading."}, 23 "title": {"type": "string", "optional": true, "description": "The titl e of the tab. This may not be available if the tab is loading."},
24 "favIconUrl": {"type": "string", "optional": true, "description": "The URL of the tab's favicon. This may not be available if the tab is loading."}, 24 "favIconUrl": {"type": "string", "optional": true, "description": "The URL of the tab's favicon. This may not be available if the tab is loading."},
25 "status": {"type": "string", "optional": true, "description": "Either <em>loading</em> or <em>complete</em>."}, 25 "status": {"type": "string", "optional": true, "description": "Either <em>loading</em> or <em>complete</em>."},
26 "incognito": {"type": "boolean", "description": "Whether the tab is in an incognito window."} 26 "incognito": {"type": "boolean", "description": "Whether the tab is in an incognito window."}
27 } 27 }
28 }, 28 },
29 { 29 {
30 "id": "InjectDetails", 30 "id": "InjectDetails",
31 "type": "object", 31 "type": "object",
32 "description": "Details of the script or CSS to inject. Either the code or the file property must be set, but both may not be set at the same time.", 32 "description": "Details of the script or CSS to inject. Either the code or the file property must be set, but both may not be set at the same time.",
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 { 267 {
268 "name": "tab", 268 "name": "tab",
269 "$ref": "Tab", 269 "$ref": "Tab",
270 "description": "Details about the created tab. Will contain the ID of the new tab." 270 "description": "Details about the created tab. Will contain the ID of the new tab."
271 } 271 }
272 ] 272 ]
273 } 273 }
274 ] 274 ]
275 }, 275 },
276 { 276 {
277 "name": "duplicate",
278 "type": "function",
279 "description": "Duplicates a tab. Note: This function can be used withou t requesting the 'tabs' permission in the manifest.",
280 "parameters": [
281 {
282 "type": "integer",
283 "name": "tabId",
284 "minimum": 0,
285 "description": "The ID of the tab which is to be duplicated."
286 },
287 {
288 "type": "function",
289 "name": "callback",
290 "optional": true,
291 "parameters": [
292 {
293 "name": "tab",
294 "optional": true,
295 "description": "Details about the duplicated tab. The Tab object doesn't contain url, title and faviconUrl if the 'tabs' permission has not been requested.",
296 "$ref": "Tab"
297 }
298 ]
299 }
300 ]
301 },
302 {
277 "name": "query", 303 "name": "query",
278 "type": "function", 304 "type": "function",
279 "description": "Gets all tabs that have the specified properties, or all tabs if no properties are specified.", 305 "description": "Gets all tabs that have the specified properties, or all tabs if no properties are specified.",
280 "parameters": [ 306 "parameters": [
281 { 307 {
282 "type": "object", 308 "type": "object",
283 "name": "queryInfo", 309 "name": "queryInfo",
284 "properties": { 310 "properties": {
285 "active": { 311 "active": {
286 "type": "boolean", 312 "type": "boolean",
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 "name": "removeInfo", 914 "name": "removeInfo",
889 "properties": { 915 "properties": {
890 "isWindowClosing": {"type": "boolean", "description": "True when t he tab is being closed because its window is being closed." } 916 "isWindowClosing": {"type": "boolean", "description": "True when t he tab is being closed because its window is being closed." }
891 } 917 }
892 } 918 }
893 ] 919 ]
894 } 920 }
895 ] 921 ]
896 } 922 }
897 ] 923 ]
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698