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

Unified Diff: content/renderer/media/mock_peer_connection_impl.h

Issue 2317063002: WebRTCPeerConnectionHandler::getStats for the new stats collector API (Closed)
Patch Set: Addressed comments 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/media/mock_peer_connection_impl.h
diff --git a/content/renderer/media/mock_peer_connection_impl.h b/content/renderer/media/mock_peer_connection_impl.h
index e597f6eb6c0a19b0423d29558aceac6d5a87822b..1227f3204fabcaf9794c43f9964c86220fd9f0e8 100644
--- a/content/renderer/media/mock_peer_connection_impl.h
+++ b/content/renderer/media/mock_peer_connection_impl.h
@@ -13,6 +13,7 @@
#include "base/macros.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "third_party/webrtc/api/peerconnectioninterface.h"
+#include "third_party/webrtc/api/stats/rtcstatsreport.h"
namespace content {
@@ -41,9 +42,12 @@ class MockPeerConnectionImpl : public webrtc::PeerConnectionInterface {
bool GetStats(webrtc::StatsObserver* observer,
webrtc::MediaStreamTrackInterface* track,
StatsOutputLevel level) override;
+ void GetStats(webrtc::RTCStatsCollectorCallback* callback) override;
- // Set Call this function to make sure next call to GetStats fail.
+ // Call this function to make sure next call to legacy GetStats fail.
void SetGetStatsResult(bool result) { getstats_result_ = result; }
+ // Set the report that |GetStats(RTCStatsCollectorCallback*)| returns.
+ void SetGetStatsReport(webrtc::RTCStatsReport* report);
SignalingState signaling_state() override {
NOTIMPLEMENTED();
@@ -132,6 +136,7 @@ class MockPeerConnectionImpl : public webrtc::PeerConnectionInterface {
int sdp_mline_index_;
std::string ice_sdp_;
webrtc::PeerConnectionObserver* observer_;
+ rtc::scoped_refptr<webrtc::RTCStatsReport> stats_report_;
DISALLOW_COPY_AND_ASSIGN(MockPeerConnectionImpl);
};

Powered by Google App Engine
This is Rietveld 408576698