From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- .../extensions/schemas/captive_portal.json | 80 ++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 toolkit/components/extensions/schemas/captive_portal.json (limited to 'toolkit/components/extensions/schemas/captive_portal.json') diff --git a/toolkit/components/extensions/schemas/captive_portal.json b/toolkit/components/extensions/schemas/captive_portal.json new file mode 100644 index 0000000000..fd697c66ae --- /dev/null +++ b/toolkit/components/extensions/schemas/captive_portal.json @@ -0,0 +1,80 @@ +[ + { + "namespace": "manifest", + "types": [ + { + "$extend": "PermissionNoPrompt", + "choices": [ + { + "type": "string", + "enum": ["captivePortal"] + } + ] + } + ] + }, + { + "namespace": "captivePortal", + "description": "This API provides the ability detect the captive portal state of the users connection.", + "permissions": ["captivePortal"], + "properties": { + "canonicalURL": { + "$ref": "types.Setting", + "description": "Return the canonical captive-portal detection URL. Read-only." + } + }, + "functions": [ + { + "name": "getState", + "type": "function", + "description": "Returns the current portal state, one of `unknown`, `not_captive`, `unlocked_portal`, `locked_portal`.", + "async": true, + "parameters": [] + }, + { + "name": "getLastChecked", + "type": "function", + "description": "Returns the time difference between NOW and the last time a request was completed in milliseconds.", + "async": true, + "parameters": [] + } + ], + "events": [ + { + "name": "onStateChanged", + "type": "function", + "description": "Fired when the captive portal state changes.", + "parameters": [ + { + "type": "object", + "name": "details", + "properties": { + "state": { + "type": "string", + "enum": [ + "unknown", + "not_captive", + "unlocked_portal", + "locked_portal" + ], + "description": "The current captive portal state." + } + } + } + ] + }, + { + "name": "onConnectivityAvailable", + "type": "function", + "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.", + "parameters": [ + { + "name": "status", + "enum": ["captive", "clear"], + "type": "string" + } + ] + } + ] + } +] -- cgit v1.2.3