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

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

Issue 21022018: Sessions API - previously Session Restore API. Supports restoring currently open foreign windows an… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updated Created 7 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
(Empty)
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
3 // found in the LICENSE file.
4
5 [
6 {
7 "namespace": "sessionRestore",
8 "description": "Use the <code>chrome.sessionRestore</code> API to query and restore tabs and windows from a browsing session.",
9 "types": [
10 {
11 "id": "ClosedEntry",
12 "type": "object",
13 "properties": {
14 "id": {"type": "integer", "minimum": 0, "description": "The ID of the browser session."},
15 "timestamp": {"type": "integer", "description": "The time when the win dow or tab was closed, represented in milliseconds since the epoch"},
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."},
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."}
18 }
19 }
20 ],
21 "functions": [
22 {
23 "name": "getRecentlyClosed",
24 "type": "function",
25 "description": "Gets the list of recently closed tabs and/or windows.",
26 "parameters": [
27 {
28 "type": "object",
29 "name": "options",
30 "optional": true,
31 "properties": {
32 "maxResults": {
33 "type": "integer",
34 "minimum": 0,
35 "maximum": 25,
36 "optional": true,
37 "description": "The maximum number of entries to be fetched in t he requested list. Omit to fetch the maximum number of entries (25)."
38 },
39 "entryType": {
40 "type": "string",
41 "enum": ["tab", "window"],
42 "optional": true,
43 "description": "The type of entry to fetch. Omit to fetch all ty pes of entries."
44 }
45 }
46 },
47 {
48 "type": "function",
49 "name": "callback",
50 "parameters": [
51 {
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."
53 }
54 ]
55 }
56 ]
57 },
58 {
59 "name": "restore",
60 "type": "function",
61 "description": "Reopens a $ref:ClosedEntry, with an optional callback to run when the entry has been restored.",
62 "parameters": [
63 {"type": "integer", "name": "id", "optional": true, "description": "Th e id of the $ref:ClosedEntry to restore."},
64 {"type": "function", "name": "callback", "optional": true, "parameters ": []}
65 ]
66 }
67 ]
68 }
69 ]
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698