Bug 1526591 - Remove devtools.inspector.shapesHighlighter.enabled pref. r=rcaliman
[gecko.git] / dom / webidl / RTCPeerConnectionStatic.webidl
blob5b21ee6e65c282a8bf106ba0873e3971151ad735
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4  * You can obtain one at http://mozilla.org/MPL/2.0/.
5  */
7 /*
8   Right now, it is not possible to add static functions to a JS implemented
9   interface (see bug 863952), so we need to create a simple interface with a
10   trivial constructor and no data to hold these functions that really ought to
11   be static in RTCPeerConnection.
12   TODO(bcampen@mozilla.com) Merge this code into RTCPeerConnection once this
13   limitation is gone. (Bug 1017082)
16 enum RTCLifecycleEvent {
17     "initialized",
18     "icegatheringstatechange",
19     "iceconnectionstatechange"
22 callback PeerConnectionLifecycleCallback = void (RTCPeerConnection pc,
23                                                  unsigned long long windowId,
24                                                  RTCLifecycleEvent eventType);
26 [ChromeOnly,
27  Pref="media.peerconnection.enabled",
28  JSImplementation="@mozilla.org/dom/peerconnectionstatic;1",
29  Constructor()]
30 interface RTCPeerConnectionStatic {
32   /* One slot per window (the window in which the register call is made),
33      automatically unregistered when window goes away.
34      Fires when a PC is created, and whenever the ICE connection state or
35      gathering state changes. */
36   void registerPeerConnectionLifecycleCallback(
37     PeerConnectionLifecycleCallback cb);