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..81e2190bb2c2359d22e0027bcc05e5a9d8f088f0 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,12 +5,15 @@ |
#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" |
#include "third_party/WebKit/public/platform/WebRTCSessionDescription.h" |
#include "third_party/WebKit/public/platform/WebRTCSessionDescriptionRequest.h" |
#include "third_party/WebKit/public/platform/WebRTCStatsRequest.h" |
+#include "third_party/WebKit/public/platform/WebString.h" |
jochen (gone - plz use gerrit)
2014/10/09 11:49:34
should not be needed, no?
perkj_chrome
2014/10/09 14:17:12
Acknowledged.
|
namespace blink { |
class WebRTCPeerConnectionHandlerClient; |
@@ -26,6 +29,7 @@ class MockWebRTCPeerConnectionHandler |
MockWebRTCPeerConnectionHandler( |
blink::WebRTCPeerConnectionHandlerClient* client, |
TestInterfaces* interfaces); |
+ virtual ~MockWebRTCPeerConnectionHandler(); |
// WebRTCPeerConnectionHandler related methods |
virtual bool initialize( |
@@ -73,7 +77,11 @@ class MockWebRTCPeerConnectionHandler |
WebTaskList* mutable_task_list() { return &task_list_; } |
private: |
- MockWebRTCPeerConnectionHandler(); |
jochen (gone - plz use gerrit)
2014/10/09 11:49:34
plz don't delete the ctor, even if its empty
perkj_chrome
2014/10/09 14:17:12
Done.
|
+ // 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_; |
@@ -82,6 +90,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); |
}; |