import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo

This commit is contained in:
Roy Tam 2018-01-19 03:59:58 +08:00
commit dcd9973243
150858 changed files with 23884658 additions and 0 deletions

View file

@ -0,0 +1,71 @@
#include "nsIThread.idl"
#include "nsIDOMWindow.idl"
#include "nsIPropertyBag2.idl"
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.
*
* See media/webrtc/signaling/include/PeerConnectionImpl.h
*/
[scriptable, uuid(d7dfe148-0416-446b-a128-66a7c71ae8d3)]
interface IPeerConnectionObserver : nsISupports
{
};
[scriptable, uuid(14afc8e7-e421-4d0c-99a5-69308d871481)]
interface IPeerConnection : nsISupports
{
const unsigned long kHintAudio = 0x00000001;
const unsigned long kHintVideo = 0x00000002;
const long kActionNone = -1;
const long kActionOffer = 0;
const long kActionAnswer = 1;
const long kActionPRAnswer = 2;
const long kActionRollback = 3;
const long kIceGathering = 0;
const long kIceWaiting = 1;
const long kIceChecking = 2;
const long kIceConnected = 3;
const long kIceFailed = 4;
/* for readyState on Peer Connection */
const long kNew = 0;
const long kNegotiating = 1;
const long kActive = 2;
const long kClosing = 3;
const long kClosed = 4;
/* for 'type' in DataChannelInit dictionary */
const unsigned short kDataChannelReliable = 0;
const unsigned short kDataChannelPartialReliableRexmit = 1;
const unsigned short kDataChannelPartialReliableTimed = 2;
/* Constants for 'name' in error callbacks */
const unsigned long kNoError = 0; // Test driver only
const unsigned long kInvalidCandidate = 2;
const unsigned long kInvalidMediastreamTrack = 3;
const unsigned long kInvalidState = 4;
const unsigned long kInvalidSessionDescription = 5;
const unsigned long kIncompatibleSessionDescription = 6;
const unsigned long kIncompatibleMediaStreamTrack = 8;
const unsigned long kInternalError = 9;
const unsigned long kMaxErrorType = 9; // Same as final error
};

View file

@ -0,0 +1,57 @@
/* 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/. */
#include "mozilla/ModuleUtils.h"
#include "nsIClassInfoImpl.h"
#ifdef MOZ_WEBRTC
#include "PeerConnectionImpl.h"
#define PEERCONNECTION_CID \
{0xb93af7a1, 0x3411, 0x44a8, {0xbd, 0x0a, 0x8a, 0xf3, 0xdd, 0xe4, 0xd8, 0xd8}}
#define PEERCONNECTION_CONTRACTID "@mozilla.org/peerconnection;1"
#include "stun_socket_filter.h"
NS_DEFINE_NAMED_CID(NS_STUN_UDP_SOCKET_FILTER_HANDLER_CID)
NS_DEFINE_NAMED_CID(NS_STUN_TCP_SOCKET_FILTER_HANDLER_CID)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsStunUDPSocketFilterHandler)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsStunTCPSocketFilterHandler)
namespace mozilla
{
// Factory defined in mozilla::, defines mozilla::PeerConnectionImplConstructor
NS_GENERIC_FACTORY_CONSTRUCTOR(PeerConnectionImpl)
}
// Defines kPEERCONNECTION_CID
NS_DEFINE_NAMED_CID(PEERCONNECTION_CID);
static const mozilla::Module::CIDEntry kCIDs[] = {
{ &kPEERCONNECTION_CID, false, nullptr, mozilla::PeerConnectionImplConstructor },
{ &kNS_STUN_UDP_SOCKET_FILTER_HANDLER_CID, false, nullptr, nsStunUDPSocketFilterHandlerConstructor },
{ &kNS_STUN_TCP_SOCKET_FILTER_HANDLER_CID, false, nullptr, nsStunTCPSocketFilterHandlerConstructor },
{ nullptr }
};
static const mozilla::Module::ContractIDEntry kContracts[] = {
{ PEERCONNECTION_CONTRACTID, &kPEERCONNECTION_CID },
{ NS_STUN_UDP_SOCKET_FILTER_HANDLER_CONTRACTID, &kNS_STUN_UDP_SOCKET_FILTER_HANDLER_CID },
{ NS_STUN_TCP_SOCKET_FILTER_HANDLER_CONTRACTID, &kNS_STUN_TCP_SOCKET_FILTER_HANDLER_CID },
{ nullptr }
};
static const mozilla::Module kModule = {
mozilla::Module::kVersion,
kCIDs,
kContracts
};
NSMODULE_DEFN(peerconnection) = &kModule;
#endif

View file

@ -0,0 +1,31 @@
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# 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/.
XPIDL_SOURCES += [
'IPeerConnection.idl',
]
XPIDL_MODULE = 'peerconnection'
SOURCES += [
'MediaModule.cpp',
]
LOCAL_INCLUDES += [
'/ipc/chromium/src',
'/media/mtransport',
'/media/mtransport',
'/media/webrtc/',
'/media/webrtc/signaling/src/common/time_profiling',
'/media/webrtc/signaling/src/media-conduit',
'/media/webrtc/signaling/src/mediapipeline',
'/media/webrtc/signaling/src/peerconnection',
]
FINAL_LIBRARY = 'xul'
if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wno-error=shadow']