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

Unified Diff: content/shell/renderer/test_runner/mock_webrtc_peer_connection_handler.h

Issue 597283006: Updated the MockWebRtcPeerConnectionHandler used in blink Layouttests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments. Created 6 years, 2 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
« no previous file with comments | « no previous file | content/shell/renderer/test_runner/mock_webrtc_peer_connection_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/renderer/test_runner/mock_webrtc_peer_connection_handler.h
diff --git a/content/shell/renderer/test_runner/mock_webrtc_peer_connection_handler.h b/content/shell/renderer/test_runner/mock_webrtc_peer_connection_handler.h
index 43f9d34fb83e153986c8a5474598c7171f4c0533..9afbd831173b3617cb72e924c1e114069d62fdaa 100644
--- a/content/shell/renderer/test_runner/mock_webrtc_peer_connection_handler.h
+++ b/content/shell/renderer/test_runner/mock_webrtc_peer_connection_handler.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKWEBRTCPEERCONNECTIONHANDLER_H_
#define CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKWEBRTCPEERCONNECTIONHANDLER_H_
+#include <map>
+
#include "base/basictypes.h"
#include "content/shell/renderer/test_runner/web_task.h"
#include "third_party/WebKit/public/platform/WebRTCPeerConnectionHandler.h"
@@ -26,6 +28,7 @@ class MockWebRTCPeerConnectionHandler
MockWebRTCPeerConnectionHandler(
blink::WebRTCPeerConnectionHandlerClient* client,
TestInterfaces* interfaces);
+ virtual ~MockWebRTCPeerConnectionHandler();
// WebRTCPeerConnectionHandler related methods
virtual bool initialize(
@@ -75,6 +78,12 @@ class MockWebRTCPeerConnectionHandler
private:
MockWebRTCPeerConnectionHandler();
+ // UpdateRemoteStreams uses the collection of |local_streams_| to create
+ // remote MediaStreams with the same number of tracks and notifies |client_|
+ // about added and removed streams. It's triggered when setRemoteDescription
+ // is called.
+ void UpdateRemoteStreams();
+
blink::WebRTCPeerConnectionHandlerClient* client_;
bool stopped_;
WebTaskList task_list_;
@@ -82,6 +91,9 @@ class MockWebRTCPeerConnectionHandler
blink::WebRTCSessionDescription remote_description_;
int stream_count_;
TestInterfaces* interfaces_;
+ typedef std::map<std::string, blink::WebMediaStream> StreamMap;
+ StreamMap local_streams_;
+ StreamMap remote_streams_;
DISALLOW_COPY_AND_ASSIGN(MockWebRTCPeerConnectionHandler);
};
« no previous file with comments | « no previous file | content/shell/renderer/test_runner/mock_webrtc_peer_connection_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698