mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
merge backout
This commit is contained in:
commit
4dd1fcf341
@ -143,7 +143,6 @@
|
||||
#ifdef MOZ_MEDIA
|
||||
#include "nsHTMLMediaElement.h"
|
||||
#endif // MOZ_MEDIA
|
||||
#include "IPeerConnection.h"
|
||||
|
||||
#include "mozAutoDocUpdate.h"
|
||||
#include "nsGlobalWindow.h"
|
||||
@ -6743,18 +6742,6 @@ nsDocument::CanSavePresentation(nsIRequest *aNewRequest)
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check if we have active PeerConnections
|
||||
nsCOMPtr<IPeerConnectionManager> pcManager =
|
||||
do_GetService(IPEERCONNECTION_MANAGER_CONTRACTID);
|
||||
|
||||
if (pcManager && win) {
|
||||
bool active;
|
||||
pcManager->HasActivePeerConnection(win->WindowID(), &active);
|
||||
if (active) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool canCache = true;
|
||||
if (mSubDocuments)
|
||||
PL_DHashTableEnumerate(mSubDocuments, CanCacheSubDocument, &canCache);
|
||||
|
@ -12,12 +12,10 @@ Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
const PC_CONTRACT = "@mozilla.org/dom/peerconnection;1";
|
||||
const PC_ICE_CONTRACT = "@mozilla.org/dom/rtcicecandidate;1";
|
||||
const PC_SESSION_CONTRACT = "@mozilla.org/dom/rtcsessiondescription;1";
|
||||
const PC_MANAGER_CONTRACT = "@mozilla.org/dom/peerconnectionmanager;1";
|
||||
|
||||
const PC_CID = Components.ID("{7cb2b368-b1ce-4560-acac-8e0dbda7d3d0}");
|
||||
const PC_ICE_CID = Components.ID("{8c5dbd70-2c8e-4ecb-a5ad-2fc919099f01}");
|
||||
const PC_SESSION_CID = Components.ID("{5f21ffd9-b73f-4ba0-a685-56b4667aaf1c}");
|
||||
const PC_MANAGER_CID = Components.ID("{7293e901-2be3-4c02-b4bd-cbef6fc24f78}");
|
||||
|
||||
// Global list of PeerConnection objects, so they can be cleaned up when
|
||||
// a page is torn down. (Maps inner window ID to an array of PC objects).
|
||||
@ -27,27 +25,7 @@ function GlobalPCList() {
|
||||
}
|
||||
GlobalPCList.prototype = {
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
|
||||
Ci.nsISupportsWeakReference,
|
||||
Ci.IPeerConnectionManager]),
|
||||
|
||||
classID: PC_MANAGER_CID,
|
||||
classInfo: XPCOMUtils.generateCI({classID: PC_MANAGER_CID,
|
||||
contractID: PC_MANAGER_CONTRACT,
|
||||
classDescription: "PeerConnectionManager",
|
||||
interfaces: [
|
||||
Ci.nsIObserver,
|
||||
Ci.nsISupportsWeakReference,
|
||||
Ci.IPeerConnectionManager
|
||||
]}),
|
||||
|
||||
_xpcom_factory: {
|
||||
createInstance: function(outer, iid) {
|
||||
if (outer) {
|
||||
throw Components.results.NS_ERROR_NO_AGGREGATION;
|
||||
}
|
||||
return _globalPCList.QueryInterface(iid);
|
||||
}
|
||||
},
|
||||
Ci.nsISupportsWeakReference]),
|
||||
|
||||
addPC: function(pc) {
|
||||
let winID = pc._winID;
|
||||
@ -58,10 +36,6 @@ GlobalPCList.prototype = {
|
||||
}
|
||||
},
|
||||
|
||||
hasActivePeerConnection: function(winID) {
|
||||
return this._list[winID] ? true : false;
|
||||
},
|
||||
|
||||
observe: function(subject, topic, data) {
|
||||
if (topic != "inner-window-destroyed") {
|
||||
return;
|
||||
@ -701,5 +675,5 @@ PeerConnectionObserver.prototype = {
|
||||
};
|
||||
|
||||
this.NSGetFactory = XPCOMUtils.generateNSGetFactory(
|
||||
[GlobalPCList, IceCandidate, SessionDescription, PeerConnection]
|
||||
[IceCandidate, SessionDescription, PeerConnection]
|
||||
);
|
||||
|
@ -1,12 +1,10 @@
|
||||
component {7cb2b368-b1ce-4560-acac-8e0dbda7d3d0} PeerConnection.js
|
||||
component {8c5dbd70-2c8e-4ecb-a5ad-2fc919099f01} PeerConnection.js
|
||||
component {5f21ffd9-b73f-4ba0-a685-56b4667aaf1c} PeerConnection.js
|
||||
component {7293e901-2be3-4c02-b4bd-cbef6fc24f78} PeerConnection.js
|
||||
|
||||
contract @mozilla.org/dom/peerconnection;1 {7cb2b368-b1ce-4560-acac-8e0dbda7d3d0}
|
||||
contract @mozilla.org/dom/rtcicecandidate;1 {8c5dbd70-2c8e-4ecb-a5ad-2fc919099f01}
|
||||
contract @mozilla.org/dom/rtcsessiondescription;1 {5f21ffd9-b73f-4ba0-a685-56b4667aaf1c}
|
||||
contract @mozilla.org/dom/peerconnectionmanager;1 {7293e901-2be3-4c02-b4bd-cbef6fc24f78}
|
||||
|
||||
category JavaScript-global-constructor mozRTCPeerConnection @mozilla.org/dom/peerconnection;1
|
||||
category JavaScript-global-constructor mozRTCIceCandidate @mozilla.org/dom/rtcicecandidate;1
|
||||
|
@ -5,19 +5,6 @@
|
||||
interface nsIDOMMediaStream;
|
||||
interface nsIDOMDataChannel;
|
||||
|
||||
/*
|
||||
* Manager interface to PeerConnection.js so it is accessible from C++.
|
||||
*/
|
||||
[scriptable, uuid(c2218bd2-2648-4701-8fa6-305d3379e9f8)]
|
||||
interface IPeerConnectionManager : nsISupports
|
||||
{
|
||||
boolean hasActivePeerConnection(in unsigned long innerWindowID);
|
||||
};
|
||||
|
||||
%{C++
|
||||
#define IPEERCONNECTION_MANAGER_CONTRACTID "@mozilla.org/dom/peerconnectionmanager;1"
|
||||
%}
|
||||
|
||||
/* Do not confuse with nsIDOMRTCPeerConnection. This interface is purely for
|
||||
* communication between the PeerConnection JS DOM binding and the C++
|
||||
* implementation in SIPCC.
|
||||
|
Loading…
Reference in New Issue
Block a user