Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(534)

Side by Side Diff: content/renderer/media/mock_peer_connection_impl.cc

Issue 2317063002: WebRTCPeerConnectionHandler::getStats for the new stats collector API (Closed)
Patch Set: TODO to impl MockWebRTCPeerConnectionHandler::getStats in a follow-up instead Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/media/mock_peer_connection_impl.h" 5 #include "content/renderer/media/mock_peer_connection_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 reports.push_back(&report2); 202 reports.push_back(&report2);
203 } 203 }
204 204
205 // Note that the callback is synchronous, not asynchronous; it will 205 // Note that the callback is synchronous, not asynchronous; it will
206 // happen before the request call completes. 206 // happen before the request call completes.
207 observer->OnComplete(reports); 207 observer->OnComplete(reports);
208 208
209 return true; 209 return true;
210 } 210 }
211 211
212 void MockPeerConnectionImpl::GetStats(
213 webrtc::RTCStatsCollectorCallback* callback) {
214 DCHECK(callback);
215 DCHECK(stats_report_);
216 callback->OnStatsDelivered(stats_report_);
217 }
218
219 void MockPeerConnectionImpl::SetGetStatsReport(webrtc::RTCStatsReport* report) {
220 stats_report_ = report;
221 }
222
212 const webrtc::SessionDescriptionInterface* 223 const webrtc::SessionDescriptionInterface*
213 MockPeerConnectionImpl::local_description() const { 224 MockPeerConnectionImpl::local_description() const {
214 return local_desc_.get(); 225 return local_desc_.get();
215 } 226 }
216 227
217 const webrtc::SessionDescriptionInterface* 228 const webrtc::SessionDescriptionInterface*
218 MockPeerConnectionImpl::remote_description() const { 229 MockPeerConnectionImpl::remote_description() const {
219 return remote_desc_.get(); 230 return remote_desc_.get();
220 } 231 }
221 232
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 sdp_mline_index_ = candidate->sdp_mline_index(); 276 sdp_mline_index_ = candidate->sdp_mline_index();
266 return candidate->ToString(&ice_sdp_); 277 return candidate->ToString(&ice_sdp_);
267 } 278 }
268 279
269 void MockPeerConnectionImpl::RegisterUMAObserver( 280 void MockPeerConnectionImpl::RegisterUMAObserver(
270 webrtc::UMAObserver* observer) { 281 webrtc::UMAObserver* observer) {
271 NOTIMPLEMENTED(); 282 NOTIMPLEMENTED();
272 } 283 }
273 284
274 } // namespace content 285 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698