OLD | NEW |
---|---|
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": "sessionRestore", | 7 "namespace": "sessions", |
8 "description": "Use the <code>chrome.sessionRestore</code> API to query and restore tabs and windows from a browsing session.", | 8 "description": "Use the <code>chrome.sessions</code> API to query and restor e tabs and windows from a browsing session.", |
9 "types": [ | 9 "types": [ |
10 { | 10 { |
11 "id": "ClosedEntry", | 11 "id": "Session", |
12 "type": "object", | 12 "type": "object", |
13 "properties": { | 13 "properties": { |
14 "id": {"type": "integer", "minimum": 0, "description": "The ID of the browser session."}, | 14 "lastModified": {"type": "integer", "description": "The time when the window or tab was closed, represented in milliseconds since the epoch"}, |
15 "timestamp": {"type": "integer", "description": "The time when the win dow or tab was closed, represented in milliseconds since the epoch"}, | 15 "tab": {"$ref": "tabs.Tab", "optional": true, "description": "The clos ed $ref:tabs.Tab, if this entry describes a tab. Either this or $ref:Session.win dow will be set."}, |
16 "tab": {"$ref": "tabs.Tab", "optional": true, "description": "The clos ed $ref:tabs.Tab, if this entry describes a tab. Either this or $ref:ClosedEntry .window will be set."}, | 16 "window": {"$ref": "windows.Window", "optional": true, "description": "The closed $ref:windows.Window, if this entry describes a window. Either this o r $ref:Session.tab will be set."} |
17 "window": {"$ref": "windows.Window", "optional": true, "description": "The closed $ref:windows.Window, if this entry describes a window. Either this o r $ref:ClosedEntry.tab will be set."} | 17 } |
18 }, | |
19 { | |
20 "id": "Device", | |
21 "type": "object", | |
22 "properties": { | |
23 "info": {"type": "string", "description": "Represents all information about a foreign device."}, | |
24 "sessions": {"type": "array", "items": {"$ref": "Session"}, "descripti on": "A list of open window sessions for the foreign device, sorted in order fro m most recently to least recently modified session. The number of sessions is eq uivalent to the number of windows open on the foreign device."} | |
not at google - send to devlin
2013/08/12 23:51:34
"sorted in order" is a tautology.
By "something a
Kristen Dwan
2013/08/15 07:11:56
so ... there is no limit on the number of sessions
| |
18 } | 25 } |
19 } | 26 } |
20 ], | 27 ], |
21 "functions": [ | 28 "functions": [ |
22 { | 29 { |
23 "name": "getRecentlyClosed", | 30 "name": "getRecentlyClosed", |
24 "type": "function", | 31 "type": "function", |
25 "description": "Gets the list of recently closed tabs and/or windows.", | 32 "description": "Gets the list of recently closed tabs and/or windows.", |
26 "parameters": [ | 33 "parameters": [ |
27 { | 34 { |
(...skipping 14 matching lines...) Expand all Loading... | |
42 "optional": true, | 49 "optional": true, |
43 "description": "The type of entry to fetch. Omit to fetch all ty pes of entries." | 50 "description": "The type of entry to fetch. Omit to fetch all ty pes of entries." |
44 } | 51 } |
45 } | 52 } |
46 }, | 53 }, |
47 { | 54 { |
48 "type": "function", | 55 "type": "function", |
49 "name": "callback", | 56 "name": "callback", |
50 "parameters": [ | 57 "parameters": [ |
51 { | 58 { |
52 "name": "entries", "type": "array", "items": { "$ref": "ClosedEn try" }, "description": "The list of closed entries in reverse order that they we re closed (the most recently closed tab or window will be at index <code>0</code >). If <code>entryType</code> is specified the entries will be only of that type , otherwise the entries may contain either tabs or windows.List of $ref:ClosedEn try representing the closed tab/window for the session." | 59 "name": "sessions", "type": "array", "items": { "$ref": "Session " }, "description": "The list of closed entries in reverse order that they were closed (the most recently closed tab or window will be at index <code>0</code>). If <code>entryType</code> is specified the entries will be only of that type, o therwise the entries may contain either tabs or windows.List of $ref:Session rep resenting the closed tab/window for the session." |
53 } | 60 } |
54 ] | 61 ] |
55 } | 62 } |
63 ] | |
64 }, | |
65 { | |
66 "name": "getDevices", | |
67 "type": "function", | |
68 "description": "Retrieves all synced sessions and returns in sorted orde r from device with most recently modified session to device with least recently modified session, and within each device by most recent to least recently modifi ed session.", | |
69 "parameters": [ | |
70 { | |
71 "type": "object", | |
72 "name": "options", | |
73 "optional": true, | |
74 "properties": { | |
75 "maxResults": { | |
76 "type": "integer", | |
77 "minimum": 0, | |
78 "maximum": 10, | |
79 "optional": true, | |
80 "description": "The maximum number of foreign devices to be fetc hed in the requested list. Omit to fetch the maximum number of devices (10)." | |
not at google - send to devlin
2013/08/12 23:51:34
oh right. This comment confused me and it's becaus
Kristen Dwan
2013/08/15 07:11:56
nope, it's the maximum number of devices that can
not at google - send to devlin
2013/08/15 20:16:24
Ok. Having a limit on the number of devices doesn'
Kristen Dwan
2013/08/16 22:03:06
it's 14 days but the tabs / windows also have to *
| |
81 } | |
82 } | |
83 }, | |
84 { | |
85 "type": "function", | |
86 "name": "callback", | |
87 "parameters": [ | |
88 { | |
89 "name": "devices", "type": "array", "items": { "$ref": "Device" }, "description": "The list of $ref:Device objects for each synced session, sort ed in order from device with most recently modified session to device with least recently modified session." | |
90 } | |
91 ] | |
92 } | |
56 ] | 93 ] |
57 }, | 94 }, |
58 { | 95 { |
59 "name": "restore", | 96 "name": "restore", |
60 "type": "function", | 97 "type": "function", |
61 "description": "Reopens a $ref:ClosedEntry, with an optional callback to run when the entry has been restored.", | 98 "description": "Reopens a $ref:Session, $ref:windows.Window, or $ref:tab s.Tab, with an optional callback to run when the entry has been restored.", |
62 "parameters": [ | 99 "parameters": [ |
63 {"type": "integer", "name": "id", "optional": true, "description": "Th e id of the $ref:ClosedEntry to restore."}, | 100 { |
64 {"type": "function", "name": "callback", "optional": true, "parameters ": []} | 101 "type": "string", |
102 "name": "sessionId", | |
103 "optional": true, | |
104 "description": "The $ref:windows.Window.sessionId, or $ref:tabs.Tab. sessionId to restore." | |
105 }, | |
106 { | |
107 "type": "function", | |
108 "name": "callback", | |
109 "optional": true, | |
110 "parameters": [ | |
111 { | |
112 "$ref": "Session", | |
113 "name": "restoredSession", | |
114 "description": "A $ref:Session containing the restored $ref:wind ows.Window or $ref:tabs.Tab object." | |
115 } | |
116 ] | |
117 } | |
65 ] | 118 ] |
66 } | 119 } |
67 ] | 120 ] |
68 } | 121 } |
69 ] | 122 ] |
OLD | NEW |