summaryrefslogtreecommitdiffstats
path: root/application/basilisk/components/webextensions/schemas/sessions.json
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-06-04 13:17:38 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-06-04 13:17:38 +0200
commita1be17c1cea81ebb1e8b131a662c698d78f3f7f2 (patch)
treea92f7de513be600cc07bac458183e9af40e00c06 /application/basilisk/components/webextensions/schemas/sessions.json
parentbf11fdd304898ac675e39b01b280d39550e419d0 (diff)
downloadUXP-a1be17c1cea81ebb1e8b131a662c698d78f3f7f2.tar
UXP-a1be17c1cea81ebb1e8b131a662c698d78f3f7f2.tar.gz
UXP-a1be17c1cea81ebb1e8b131a662c698d78f3f7f2.tar.lz
UXP-a1be17c1cea81ebb1e8b131a662c698d78f3f7f2.tar.xz
UXP-a1be17c1cea81ebb1e8b131a662c698d78f3f7f2.zip
Issue #303 Part 1: Move basilisk files from /browser to /application/basilisk
Diffstat (limited to 'application/basilisk/components/webextensions/schemas/sessions.json')
-rw-r--r--application/basilisk/components/webextensions/schemas/sessions.json146
1 files changed, 146 insertions, 0 deletions
diff --git a/application/basilisk/components/webextensions/schemas/sessions.json b/application/basilisk/components/webextensions/schemas/sessions.json
new file mode 100644
index 000000000..690bb8ebc
--- /dev/null
+++ b/application/basilisk/components/webextensions/schemas/sessions.json
@@ -0,0 +1,146 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+[
+ {
+ "namespace": "manifest",
+ "types": [
+ {
+ "$extend": "Permission",
+ "choices": [{
+ "type": "string",
+ "enum": [
+ "sessions"
+ ]
+ }]
+ }
+ ]
+ },
+ {
+ "namespace": "sessions",
+ "description": "Use the <code>chrome.sessions</code> API to query and restore tabs and windows from a browsing session.",
+ "permissions": ["sessions"],
+ "types": [
+ {
+ "id": "Filter",
+ "type": "object",
+ "properties": {
+ "maxResults": {
+ "type": "integer",
+ "minimum": 0,
+ "maximum": 25,
+ "optional": true,
+ "description": "The maximum number of entries to be fetched in the requested list. Omit this parameter to fetch the maximum number of entries ($(ref:sessions.MAX_SESSION_RESULTS))."
+ }
+ }
+ },
+ {
+ "id": "Session",
+ "type": "object",
+ "properties": {
+ "lastModified": {"type": "integer", "description": "The time when the window or tab was closed or modified, represented in milliseconds since the epoch."},
+ "tab": {"$ref": "tabs.Tab", "optional": true, "description": "The $(ref:tabs.Tab), if this entry describes a tab. Either this or $(ref:sessions.Session.window) will be set."},
+ "window": {"$ref": "windows.Window", "optional": true, "description": "The $(ref:windows.Window), if this entry describes a window. Either this or $(ref:sessions.Session.tab) will be set."}
+ }
+ },
+ {
+ "id": "Device",
+ "type": "object",
+ "properties": {
+ "info": {"type": "string"},
+ "deviceName": {"type": "string", "description": "The name of the foreign device."},
+ "sessions": {"type": "array", "items": {"$ref": "Session"}, "description": "A list of open window sessions for the foreign device, sorted from most recently to least recently modified session."}
+ }
+ }
+ ],
+ "functions": [
+ {
+ "name": "getRecentlyClosed",
+ "type": "function",
+ "description": "Gets the list of recently closed tabs and/or windows.",
+ "async": "callback",
+ "parameters": [
+ {
+ "$ref": "Filter",
+ "name": "filter",
+ "optional": true,
+ "default": {}
+ },
+ {
+ "type": "function",
+ "name": "callback",
+ "parameters": [
+ {
+ "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>). The entries may contain either tabs or windows."
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "getDevices",
+ "unsupported": true,
+ "type": "function",
+ "description": "Retrieves all devices with synced sessions.",
+ "async": "callback",
+ "parameters": [
+ {
+ "$ref": "Filter",
+ "name": "filter",
+ "optional": true
+ },
+ {
+ "type": "function",
+ "name": "callback",
+ "parameters": [
+ {
+ "name": "devices", "type": "array", "items": { "$ref": "Device" }, "description": "The list of $(ref:sessions.Device) objects for each synced session, sorted in order from device with most recently modified session to device with least recently modified session. $(ref:tabs.Tab) objects are sorted by recency in the $(ref:windows.Window) of the $(ref:sessions.Session) objects."
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "restore",
+ "type": "function",
+ "description": "Reopens a $(ref:windows.Window) or $(ref:tabs.Tab), with an optional callback to run when the entry has been restored.",
+ "async": "callback",
+ "parameters": [
+ {
+ "type": "string",
+ "name": "sessionId",
+ "optional": true,
+ "description": "The $(ref:windows.Window.sessionId), or $(ref:tabs.Tab.sessionId) to restore. If this parameter is not specified, the most recently closed session is restored."
+ },
+ {
+ "type": "function",
+ "name": "callback",
+ "optional": true,
+ "parameters": [
+ {
+ "$ref": "Session",
+ "name": "restoredSession",
+ "description": "A $(ref:sessions.Session) containing the restored $(ref:windows.Window) or $(ref:tabs.Tab) object."
+ }
+ ]
+ }
+ ]
+ }
+ ],
+ "events": [
+ {
+ "name": "onChanged",
+ "unsupported": true,
+ "description": "Fired when recently closed tabs and/or windows are changed. This event does not monitor synced sessions changes.",
+ "type": "function"
+ }
+ ],
+ "properties": {
+ "MAX_SESSION_RESULTS": {
+ "value": 25,
+ "description": "The maximum number of $(ref:sessions.Session) that will be included in a requested list."
+ }
+ }
+ }
+]