Skip to content

Commit 995052a

Browse files
authored
Import Firefox 68 schema. (#2624)
* Import Firefox 68 schema. Fixes #2623 * Add missing captive_portal.json
1 parent 9164fcf commit 995052a

File tree

9 files changed

+211
-253
lines changed

9 files changed

+211
-253
lines changed
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
{
2+
"id": "captivePortal",
3+
"description": "This API provides the ability detect the captive portal state of the users connection.",
4+
"permissions": [
5+
"captivePortal"
6+
],
7+
"functions": [
8+
{
9+
"name": "getState",
10+
"type": "function",
11+
"description": "Returns the current portal state, one of `unknown`, `not_captive`, `unlocked_portal`, `locked_portal`.",
12+
"async": true,
13+
"parameters": []
14+
},
15+
{
16+
"name": "getLastChecked",
17+
"type": "function",
18+
"description": "Returns the time difference between NOW and the last time a request was completed in milliseconds.",
19+
"async": true,
20+
"parameters": []
21+
}
22+
],
23+
"events": [
24+
{
25+
"name": "onStateChanged",
26+
"type": "function",
27+
"description": "Fired when the captive portal state changes.",
28+
"parameters": [
29+
{
30+
"type": "object",
31+
"name": "details",
32+
"properties": {
33+
"state": {
34+
"type": "string",
35+
"enum": [
36+
"unknown",
37+
"not_captive",
38+
"unlocked_portal",
39+
"locked_portal"
40+
],
41+
"description": "The current captive portal state."
42+
}
43+
},
44+
"required": [
45+
"state"
46+
]
47+
}
48+
]
49+
},
50+
{
51+
"name": "onConnectivityAvailable",
52+
"type": "function",
53+
"description": "This notification will be emitted when the captive portal service has determined that we can connect to the internet. The service will pass either `captive` if there is an unlocked captive portal present, or `clear` if no captive portal was detected.",
54+
"parameters": [
55+
{
56+
"name": "status",
57+
"enum": [
58+
"captive",
59+
"clear"
60+
],
61+
"type": "string"
62+
}
63+
]
64+
}
65+
],
66+
"definitions": {
67+
"Permission": {
68+
"anyOf": [
69+
{
70+
"type": "string",
71+
"enum": [
72+
"captivePortal"
73+
]
74+
}
75+
]
76+
}
77+
},
78+
"refs": {
79+
"captivePortal#/definitions/Permission": {
80+
"namespace": "manifest",
81+
"type": "Permission"
82+
}
83+
},
84+
"types": {}
85+
}

src/schema/imported/chrome_settings_overrides.json

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
},
3636
"suggest_url": {
3737
"type": "string",
38-
"format": "url",
38+
"pattern": "^https://.*$|^$",
3939
"preprocess": "localize"
4040
},
4141
"instant_url": {
@@ -50,11 +50,21 @@
5050
"preprocess": "localize",
5151
"deprecated": "Unsupported on Firefox at this time."
5252
},
53+
"search_url_get_params": {
54+
"type": "string",
55+
"preprocess": "localize",
56+
"description": "GET parameters to the search_url as a query string."
57+
},
5358
"search_url_post_params": {
5459
"type": "string",
5560
"preprocess": "localize",
5661
"description": "POST parameters to the search_url as a query string."
5762
},
63+
"suggest_url_get_params": {
64+
"type": "string",
65+
"preprocess": "localize",
66+
"description": "GET parameters to the suggest_url as a query string."
67+
},
5868
"suggest_url_post_params": {
5969
"type": "string",
6070
"preprocess": "localize",
@@ -70,6 +80,12 @@
7080
"preprocess": "localize",
7181
"deprecated": "Unsupported on Firefox at this time."
7282
},
83+
"search_form": {
84+
"type": "string",
85+
"format": "url",
86+
"pattern": "^https://.*$",
87+
"preprocess": "localize"
88+
},
7389
"alternate_urls": {
7490
"type": "array",
7591
"items": {
@@ -125,7 +141,8 @@
125141
},
126142
"value": {
127143
"type": "string",
128-
"description": "A url parameter value."
144+
"description": "A url parameter value.",
145+
"preprocess": "localize"
129146
}
130147
},
131148
"required": [

src/schema/imported/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import bookmarks from './bookmarks.json';
55
import browserAction from './browser_action.json';
66
import browserSettings from './browser_settings.json';
77
import browsingData from './browsing_data.json';
8+
import captivePortal from './captive_portal.json';
89
import chrome_settings_overrides from './chrome_settings_overrides.json';
910
import clipboard from './clipboard.json';
1011
import commands from './commands.json';
@@ -58,6 +59,7 @@ export default [
5859
browserAction,
5960
browserSettings,
6061
browsingData,
62+
captivePortal,
6163
chrome_settings_overrides,
6264
clipboard,
6365
commands,

src/schema/imported/manifest.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,9 @@
509509
{
510510
"$ref": "browsingData#/definitions/Permission"
511511
},
512+
{
513+
"$ref": "captivePortal#/definitions/Permission"
514+
},
512515
{
513516
"$ref": "contextualIdentities#/definitions/Permission"
514517
},
@@ -578,7 +581,8 @@
578581
"ExtensionFileUrl": {
579582
"type": "string",
580583
"format": "strictRelativeUrl",
581-
"pattern": "\\S"
584+
"pattern": "\\S",
585+
"preprocess": "localize"
582586
},
583587
"ImageDataOrExtensionURL": {
584588
"type": "string",

src/schema/imported/proxy.json

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
{
2121
"name": "register",
2222
"type": "function",
23+
"deprecated": "proxy.register has been deprecated and will be removed in Firefox 71.",
2324
"description": "Registers the proxy script for the extension.",
2425
"async": true,
2526
"parameters": [
@@ -33,15 +34,16 @@
3334
{
3435
"name": "unregister",
3536
"type": "function",
37+
"deprecated": "proxy.unregister has been deprecated and will be removed in Firefox 71.",
3638
"description": "Unregisters the proxy script for the extension.",
3739
"async": true,
3840
"parameters": []
3941
},
4042
{
4143
"name": "registerProxyScript",
4244
"type": "function",
43-
"description": "Registers the proxy script for the extension.",
44-
"deprecated": "Please use $(ref:proxy.register)",
45+
"deprecated": "proxy.registerProxyScript has been deprecated and will be removed in Firefox 71.",
46+
"description": "Registers the proxy script for the extension. This is an alias for proxy.register.",
4547
"async": true,
4648
"parameters": [
4749
{
@@ -81,6 +83,14 @@
8183
"type": "integer",
8284
"description": "ID of frame that wraps the frame which sent the request. Set to -1 if no parent frame exists."
8385
},
86+
"incognito": {
87+
"type": "boolean",
88+
"description": "True for private browsing requests."
89+
},
90+
"cookieStoreId": {
91+
"type": "string",
92+
"description": "The cookie store ID of the contextual identity."
93+
},
8494
"originUrl": {
8595
"type": "string",
8696
"description": "URL of the resource that triggered this request."
@@ -168,7 +178,7 @@
168178
{
169179
"name": "onError",
170180
"type": "function",
171-
"description": "Notifies about proxy script errors.",
181+
"description": "Notifies about errors caused by the invalid use of the proxy API.",
172182
"parameters": [
173183
{
174184
"name": "error",
@@ -179,6 +189,7 @@
179189
{
180190
"name": "onProxyError",
181191
"type": "function",
192+
"deprecated": "proxy.onProxyError has been deprecated and will be removed in Firefox 71. Use proxy.onError instead.",
182193
"description": "Please use $(ref:proxy.onError).",
183194
"parameters": [
184195
{

src/schema/imported/runtime.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,9 @@
227227
"name": "connectNative",
228228
"type": "function",
229229
"description": "Connects to a native application in the host machine.",
230+
"allowedContexts": [
231+
"content"
232+
],
230233
"permissions": [
231234
"nativeMessaging"
232235
],
@@ -303,6 +306,9 @@
303306
"name": "sendNativeMessage",
304307
"type": "function",
305308
"description": "Send a single message to a native application.",
309+
"allowedContexts": [
310+
"content"
311+
],
306312
"permissions": [
307313
"nativeMessaging"
308314
],

src/schema/imported/telemetry.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
"id": "telemetry",
33
"description": "Use the <code>browser.telemetry</code> API to send telemetry data to the Mozilla Telemetry service. Restricted to Mozilla privileged webextensions.",
44
"permissions": [
5-
"telemetry",
6-
"mozillaAddons"
5+
"telemetry"
76
],
87
"functions": [
98
{

0 commit comments

Comments
 (0)