OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 1145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1156 UseCounter::RTCPeerConnectionGetStatsLegacyNonCompliant); | 1156 UseCounter::RTCPeerConnectionGetStatsLegacyNonCompliant); |
1157 RTCStatsRequest* statsRequest = RTCStatsRequestImpl::create( | 1157 RTCStatsRequest* statsRequest = RTCStatsRequestImpl::create( |
1158 getExecutionContext(), this, successCallback, selector); | 1158 getExecutionContext(), this, successCallback, selector); |
1159 // FIXME: Add passing selector as part of the statsRequest. | 1159 // FIXME: Add passing selector as part of the statsRequest. |
1160 m_peerHandler->getStats(statsRequest); | 1160 m_peerHandler->getStats(statsRequest); |
1161 | 1161 |
1162 resolver->resolve(); | 1162 resolver->resolve(); |
1163 return promise; | 1163 return promise; |
1164 } | 1164 } |
1165 | 1165 |
1166 ScriptPromise RTCPeerConnection::getStats(ScriptState* scriptState, | 1166 ScriptPromise RTCPeerConnection::getStats(ScriptState* scriptState) { |
1167 MediaStreamTrack* selector) { | |
1168 ExecutionContext* context = scriptState->getExecutionContext(); | 1167 ExecutionContext* context = scriptState->getExecutionContext(); |
1169 UseCounter::count(context, UseCounter::RTCPeerConnectionGetStats); | 1168 UseCounter::count(context, UseCounter::RTCPeerConnectionGetStats); |
1170 | 1169 |
1171 ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState); | 1170 ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState); |
1172 ScriptPromise promise = resolver->promise(); | 1171 ScriptPromise promise = resolver->promise(); |
1173 m_peerHandler->getStats(WebRTCStatsReportCallbackResolver::create(resolver)); | 1172 m_peerHandler->getStats(WebRTCStatsReportCallbackResolver::create(resolver)); |
1174 | 1173 |
1175 return promise; | 1174 return promise; |
1176 } | 1175 } |
1177 | 1176 |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1488 DEFINE_TRACE(RTCPeerConnection) { | 1487 DEFINE_TRACE(RTCPeerConnection) { |
1489 visitor->trace(m_localStreams); | 1488 visitor->trace(m_localStreams); |
1490 visitor->trace(m_remoteStreams); | 1489 visitor->trace(m_remoteStreams); |
1491 visitor->trace(m_dispatchScheduledEventRunner); | 1490 visitor->trace(m_dispatchScheduledEventRunner); |
1492 visitor->trace(m_scheduledEvents); | 1491 visitor->trace(m_scheduledEvents); |
1493 EventTargetWithInlineData::trace(visitor); | 1492 EventTargetWithInlineData::trace(visitor); |
1494 SuspendableObject::trace(visitor); | 1493 SuspendableObject::trace(visitor); |
1495 } | 1494 } |
1496 | 1495 |
1497 } // namespace blink | 1496 } // namespace blink |
OLD | NEW |