| Index: third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp
|
| diff --git a/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp b/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp
|
| index 1c63506d55dc2271ff042304b52afe6372f0c1d6..8833e93f3918c5bba84e86f3a0e7500fb5703841 100644
|
| --- a/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp
|
| +++ b/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp
|
| @@ -46,6 +46,7 @@
|
| #include "core/dom/Document.h"
|
| #include "core/dom/ExceptionCode.h"
|
| #include "core/dom/ExecutionContext.h"
|
| +#include "core/frame/HostsUsingFeatures.h"
|
| #include "core/frame/LocalFrame.h"
|
| #include "core/frame/UseCounter.h"
|
| #include "core/html/VoidCallback.h"
|
| @@ -395,6 +396,9 @@ DEFINE_TRACE(RTCPeerConnection::EventWrapper)
|
|
|
| RTCPeerConnection* RTCPeerConnection::create(ExecutionContext* context, const Dictionary& rtcConfiguration, const Dictionary& mediaConstraints, ExceptionState& exceptionState)
|
| {
|
| + Document* document = toDocument(context);
|
| + HostsUsingFeatures::countAnyWorld(*document, HostsUsingFeatures::Feature::RTCPeerConnectionCreated);
|
| +
|
| if (mediaConstraints.isObject())
|
| UseCounter::count(context, UseCounter::RTCPeerConnectionConstructorConstraints);
|
| else
|
| @@ -1157,6 +1161,10 @@ void RTCPeerConnection::changeSignalingState(SignalingState signalingState)
|
| {
|
| if (m_signalingState != SignalingStateClosed && m_signalingState != signalingState) {
|
| m_signalingState = signalingState;
|
| + if (m_signalingState == SignalingStateStable) {
|
| + Document* document = toDocument(getExecutionContext());
|
| + HostsUsingFeatures::countAnyWorld(*document, HostsUsingFeatures::Feature::RTCPeerConnectionStable);
|
| + }
|
| scheduleDispatchEvent(Event::create(EventTypeNames::signalingstatechange));
|
| }
|
| }
|
| @@ -1170,6 +1178,10 @@ bool RTCPeerConnection::setIceConnectionState(ICEConnectionState iceConnectionSt
|
| {
|
| if (m_iceConnectionState != ICEConnectionStateClosed && m_iceConnectionState != iceConnectionState) {
|
| m_iceConnectionState = iceConnectionState;
|
| + if (m_iceConnectionState == ICEConnectionStateConnected) {
|
| + Document* document = toDocument(getExecutionContext());
|
| + HostsUsingFeatures::countAnyWorld(*document, HostsUsingFeatures::Feature::RTCPeerConnectionConnected);
|
| + }
|
| return true;
|
| }
|
| return false;
|
|
|