summaryrefslogtreecommitdiffstats
path: root/dom/webidl
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2020-02-06 16:03:39 -0500
committerMatt A. Tobin <email@mattatobin.com>2020-02-06 16:03:39 -0500
commit5483f807c2663be8c63caf8d59ee151b3ef499d3 (patch)
tree13b912637e69511529d15676a905e7fe0ef2d169 /dom/webidl
parente80e4595b9034fb06592c083c80feb7613ff9518 (diff)
downloadUXP-5483f807c2663be8c63caf8d59ee151b3ef499d3.tar
UXP-5483f807c2663be8c63caf8d59ee151b3ef499d3.tar.gz
UXP-5483f807c2663be8c63caf8d59ee151b3ef499d3.tar.lz
UXP-5483f807c2663be8c63caf8d59ee151b3ef499d3.tar.xz
UXP-5483f807c2663be8c63caf8d59ee151b3ef499d3.zip
Issue #1390 - Get rid of the Presentation API
Diffstat (limited to 'dom/webidl')
-rw-r--r--dom/webidl/Navigator.webidl5
-rw-r--r--dom/webidl/Presentation.webidl30
-rw-r--r--dom/webidl/PresentationAvailability.webidl22
-rw-r--r--dom/webidl/PresentationConnection.webidl96
-rw-r--r--dom/webidl/PresentationConnectionAvailableEvent.webidl22
-rw-r--r--dom/webidl/PresentationConnectionCloseEvent.webidl41
-rw-r--r--dom/webidl/PresentationConnectionList.webidl25
-rw-r--r--dom/webidl/PresentationDeviceInfoManager.webidl26
-rw-r--r--dom/webidl/PresentationReceiver.webidl18
-rw-r--r--dom/webidl/PresentationRequest.webidl86
-rw-r--r--dom/webidl/moz.build9
11 files changed, 0 insertions, 380 deletions
diff --git a/dom/webidl/Navigator.webidl b/dom/webidl/Navigator.webidl
index c353e8be7..7ca612f98 100644
--- a/dom/webidl/Navigator.webidl
+++ b/dom/webidl/Navigator.webidl
@@ -331,11 +331,6 @@ partial interface Navigator {
};
partial interface Navigator {
- [Throws, Pref="dom.presentation.enabled", SameObject]
- readonly attribute Presentation? presentation;
-};
-
-partial interface Navigator {
[NewObject, Func="mozilla::dom::TCPSocket::ShouldTCPSocketExist"]
readonly attribute LegacyMozTCPSocket mozTCPSocket;
};
diff --git a/dom/webidl/Presentation.webidl b/dom/webidl/Presentation.webidl
deleted file mode 100644
index d5b331616..000000000
--- a/dom/webidl/Presentation.webidl
+++ /dev/null
@@ -1,30 +0,0 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/presentation-api/#interface-presentation
- */
-
-[Pref="dom.presentation.enabled"]
-interface Presentation {
- /*
- * This should be used by the UA as the default presentation request for the
- * controller. When the UA wishes to initiate a PresentationConnection on the
- * controller's behalf, it MUST start a presentation connection using the default
- * presentation request (as if the controller had called |defaultRequest.start()|).
- *
- * Only used by controlling browsing context (senders).
- */
- [Pref="dom.presentation.controller.enabled"]
- attribute PresentationRequest? defaultRequest;
-
- /*
- * This should be available on the receiving browsing context in order to
- * access the controlling browsing context and communicate with them.
- */
- [SameObject,
- Pref="dom.presentation.receiver.enabled"]
- readonly attribute PresentationReceiver? receiver;
-};
diff --git a/dom/webidl/PresentationAvailability.webidl b/dom/webidl/PresentationAvailability.webidl
deleted file mode 100644
index f72b88565..000000000
--- a/dom/webidl/PresentationAvailability.webidl
+++ /dev/null
@@ -1,22 +0,0 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/presentation-api/#interface-presentationavailability
- */
-
-[Pref="dom.presentation.controller.enabled"]
-interface PresentationAvailability : EventTarget {
- /*
- * If there is at least one device discovered by UA, the value is |true|.
- * Otherwise, its value should be |false|.
- */
- readonly attribute boolean value;
-
- /*
- * It is called when device availability changes.
- */
- attribute EventHandler onchange;
-};
diff --git a/dom/webidl/PresentationConnection.webidl b/dom/webidl/PresentationConnection.webidl
deleted file mode 100644
index 9676d2069..000000000
--- a/dom/webidl/PresentationConnection.webidl
+++ /dev/null
@@ -1,96 +0,0 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/presentation-api/#interface-presentationconnection
- */
-
-enum PresentationConnectionState
-{
- // The initial state when a PresentationConnection is ceated.
- "connecting",
-
- // Existing presentation, and the communication channel is active.
- "connected",
-
- // Existing presentation, but the communication channel is inactive.
- "closed",
-
- // The presentation is nonexistent anymore. It could be terminated manually,
- // or either controlling or receiving browsing context is no longer available.
- "terminated"
-};
-
-enum PresentationConnectionBinaryType
-{
- "blob",
- "arraybuffer"
-};
-
-[Pref="dom.presentation.enabled"]
-interface PresentationConnection : EventTarget {
- /*
- * Unique id for all existing connections.
- */
- [Constant]
- readonly attribute DOMString id;
-
- /*
- * Specifies the connection's presentation URL.
- */
- readonly attribute DOMString url;
-
- /*
- * @value "connected", "closed", or "terminated".
- */
- readonly attribute PresentationConnectionState state;
-
- attribute EventHandler onconnect;
- attribute EventHandler onclose;
- attribute EventHandler onterminate;
- attribute PresentationConnectionBinaryType binaryType;
-
- /*
- * After a communication channel has been established between the controlling
- * and receiving context, this function is called to send message out, and the
- * event handler "onmessage" will be invoked at the remote side.
- *
- * This function only works when the state is "connected".
- */
- [Throws]
- void send(DOMString data);
-
- [Throws]
- void send(Blob data);
-
- [Throws]
- void send(ArrayBuffer data);
-
- [Throws]
- void send(ArrayBufferView data);
-
- /*
- * It is triggered when receiving messages.
- */
- attribute EventHandler onmessage;
-
- /*
- * Both the controlling and receiving browsing context can close the
- * connection. Then the connection state should turn into "closed".
- *
- * This function only works when the state is "connected" or "connecting".
- */
- [Throws]
- void close();
-
- /*
- * Both the controlling and receiving browsing context can terminate the
- * connection. Then the connection state should turn into "terminated".
- *
- * This function only works when the state is not "connected".
- */
- [Throws]
- void terminate();
-};
diff --git a/dom/webidl/PresentationConnectionAvailableEvent.webidl b/dom/webidl/PresentationConnectionAvailableEvent.webidl
deleted file mode 100644
index 9efecb7d6..000000000
--- a/dom/webidl/PresentationConnectionAvailableEvent.webidl
+++ /dev/null
@@ -1,22 +0,0 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/presentation-api/#interface-presentationconnectionavailableevent
- */
-
-[Constructor(DOMString type,
- PresentationConnectionAvailableEventInit eventInitDict),
- Pref="dom.presentation.enabled"]
-interface PresentationConnectionAvailableEvent : Event
-{
- [SameObject]
- readonly attribute PresentationConnection connection;
-};
-
-dictionary PresentationConnectionAvailableEventInit : EventInit
-{
- required PresentationConnection connection;
-};
diff --git a/dom/webidl/PresentationConnectionCloseEvent.webidl b/dom/webidl/PresentationConnectionCloseEvent.webidl
deleted file mode 100644
index da6c25545..000000000
--- a/dom/webidl/PresentationConnectionCloseEvent.webidl
+++ /dev/null
@@ -1,41 +0,0 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/presentation-api/#interface-presentationconnectioncloseevent
- */
-
-enum PresentationConnectionClosedReason
-{
- // The communication encountered an unrecoverable error.
- "error",
-
- // |PresentationConnection.close()| is called by controlling browsing context
- // or the receiving browsing context.
- "closed",
-
- // The connection is closed because the destination browsing context
- // that owned the connection navigated or was discarded.
- "wentaway"
-};
-
-[Constructor(DOMString type,
- PresentationConnectionCloseEventInit eventInitDict),
- Pref="dom.presentation.enabled"]
-interface PresentationConnectionCloseEvent : Event
-{
- readonly attribute PresentationConnectionClosedReason reason;
-
- // The message is a human readable description of
- // how the communication channel encountered an error.
- // It is empty when the closed reason is closed or wentaway.
- readonly attribute DOMString message;
-};
-
-dictionary PresentationConnectionCloseEventInit : EventInit
-{
- required PresentationConnectionClosedReason reason;
- DOMString message = "";
-};
diff --git a/dom/webidl/PresentationConnectionList.webidl b/dom/webidl/PresentationConnectionList.webidl
deleted file mode 100644
index 2c90ce9de..000000000
--- a/dom/webidl/PresentationConnectionList.webidl
+++ /dev/null
@@ -1,25 +0,0 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/presentation-api/#interface-presentationconnectionlist
- */
-
-[Pref="dom.presentation.receiver.enabled"]
-interface PresentationConnectionList : EventTarget {
- /*
- * Return the non-terminated set of presentation connections in the
- * set of presentation controllers.
- * TODO: Use FrozenArray once available. (Bug 1236777)
- * readonly attribute FrozenArray<PresentationConnection> connections;
- */
- [Frozen, Cached, Pure]
- readonly attribute sequence<PresentationConnection> connections;
-
- /*
- * It is called when an incoming connection is connected.
- */
- attribute EventHandler onconnectionavailable;
-};
diff --git a/dom/webidl/PresentationDeviceInfoManager.webidl b/dom/webidl/PresentationDeviceInfoManager.webidl
deleted file mode 100644
index 6ccace324..000000000
--- a/dom/webidl/PresentationDeviceInfoManager.webidl
+++ /dev/null
@@ -1,26 +0,0 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-dictionary PresentationDeviceInfo {
- DOMString id;
- DOMString name;
- DOMString type;
-};
-
-[NavigatorProperty="mozPresentationDeviceInfo",
- JSImplementation="@mozilla.org/presentation-device/deviceInfo;1",
- Pref="dom.presentation.enabled",
- ChromeOnly]
-interface PresentationDeviceInfoManager : EventTarget {
- // notify if any device updated.
- attribute EventHandler ondevicechange;
-
- // retrieve all available device infos
- Promise<sequence<PresentationDeviceInfo>> getAll();
-
- // Force all registered device provider to update device information.
- void forceDiscovery();
-};
diff --git a/dom/webidl/PresentationReceiver.webidl b/dom/webidl/PresentationReceiver.webidl
deleted file mode 100644
index 4acb37cf3..000000000
--- a/dom/webidl/PresentationReceiver.webidl
+++ /dev/null
@@ -1,18 +0,0 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/presentation-api/#interface-presentationreceiver
- */
-
-[Pref="dom.presentation.receiver.enabled"]
-interface PresentationReceiver {
- /*
- * Get a list which contains all connected presentation connections
- * in a receiving browsing context.
- */
- [SameObject, Throws]
- readonly attribute Promise<PresentationConnectionList> connectionList;
-};
diff --git a/dom/webidl/PresentationRequest.webidl b/dom/webidl/PresentationRequest.webidl
deleted file mode 100644
index c0c5fb8a6..000000000
--- a/dom/webidl/PresentationRequest.webidl
+++ /dev/null
@@ -1,86 +0,0 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://w3c.github.io/presentation-api/#interface-presentationrequest
- */
-
-[Constructor(DOMString url),
- Constructor(sequence<DOMString> urls),
- Pref="dom.presentation.controller.enabled"]
-interface PresentationRequest : EventTarget {
- /*
- * A requesting page use start() to start a new connection, and it will be
- * returned with the promise. UA may show a prompt box with a list of
- * available devices and ask the user to grant permission, choose a device, or
- * cancel the operation.
- *
- * The promise is resolved when the presenting page is successfully loaded and
- * the communication channel is established, i.e., the connection state is
- * "connected".
- *
- * The promise may be rejected duo to one of the following reasons:
- * - "OperationError": Unexpected error occurs.
- * - "NotFoundError": No available device.
- * - "AbortError": User dismiss/cancel the device prompt box.
- * - "NetworkError": Failed to establish the control channel or data channel.
- * - "TimeoutError": Presenting page takes too long to load.
- * - "SecurityError": This operation is insecure.
- */
- [Throws]
- Promise<PresentationConnection> start();
-
- /*
- * A requesting page can use reconnect(presentationId) to reopen a
- * non-terminated presentation connection.
- *
- * The promise is resolved when a new presentation connection is created.
- * The connection state is "connecting".
- *
- * The promise may be rejected duo to one of the following reasons:
- * - "OperationError": Unexpected error occurs.
- * - "NotFoundError": Can not find a presentation connection with the presentationId.
- * - "SecurityError": This operation is insecure.
- */
- [Throws]
- Promise<PresentationConnection> reconnect(DOMString presentationId);
-
- /*
- * UA triggers device discovery mechanism periodically and monitor device
- * availability.
- *
- * The promise may be rejected duo to one of the following reasons:
- * - "NotSupportedError": Unable to continuously monitor the availability.
- * - "SecurityError": This operation is insecure.
- */
- [Throws]
- Promise<PresentationAvailability> getAvailability();
-
- /*
- * It is called when a connection associated with a PresentationRequest is created.
- * The event is fired for all connections that are created for the controller.
- */
- attribute EventHandler onconnectionavailable;
-
- /*
- * A chrome page, or page which has presentation-device-manage permissiongs,
- * uses startWithDevice() to start a new connection with specified device,
- * and it will be returned with the promise. UA may show a prompt box with a
- * list of available devices and ask the user to grant permission, choose a
- * device, or cancel the operation.
- *
- * The promise is resolved when the presenting page is successfully loaded and
- * the communication channel is established, i.e., the connection state is
- * "connected".
- *
- * The promise may be rejected duo to one of the following reasons:
- * - "OperationError": Unexpected error occurs.
- * - "NotFoundError": No available device.
- * - "NetworkError": Failed to establish the control channel or data channel.
- * - "TimeoutError": Presenting page takes too long to load.
- */
- [ChromeOnly, Throws]
- Promise<PresentationConnection> startWithDevice(DOMString deviceId);
-};
diff --git a/dom/webidl/moz.build b/dom/webidl/moz.build
index 4740887f3..aaf19a89a 100644
--- a/dom/webidl/moz.build
+++ b/dom/webidl/moz.build
@@ -353,13 +353,6 @@ WEBIDL_FILES = [
'PopupBoxObject.webidl',
'Position.webidl',
'PositionError.webidl',
- 'Presentation.webidl',
- 'PresentationAvailability.webidl',
- 'PresentationConnection.webidl',
- 'PresentationConnectionList.webidl',
- 'PresentationDeviceInfoManager.webidl',
- 'PresentationReceiver.webidl',
- 'PresentationRequest.webidl',
'ProcessingInstruction.webidl',
'ProfileTimelineMarker.webidl',
'Promise.webidl',
@@ -706,8 +699,6 @@ GENERATED_EVENTS_WEBIDL_FILES = [
'PluginCrashedEvent.webidl',
'PopStateEvent.webidl',
'PopupBlockedEvent.webidl',
- 'PresentationConnectionAvailableEvent.webidl',
- 'PresentationConnectionCloseEvent.webidl',
'ProgressEvent.webidl',
'RecordErrorEvent.webidl',
'ScrollViewChangeEvent.webidl',