OLD | NEW |
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_media_stream_impl.h" | 5 #include "content/renderer/media/mock_media_stream_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "content/renderer/media/rtc_video_decoder.h" | 9 #include "content/renderer/media/rtc_video_decoder.h" |
10 | 10 |
11 MockMediaStreamImpl::MockMediaStreamImpl() | 11 MockMediaStreamImpl::MockMediaStreamImpl() |
12 : MediaStreamImpl(NULL, NULL, NULL, NULL) { | 12 : MediaStreamImpl(NULL, NULL, NULL, NULL) { |
13 } | 13 } |
14 | 14 |
15 MockMediaStreamImpl::~MockMediaStreamImpl() {} | 15 MockMediaStreamImpl::~MockMediaStreamImpl() {} |
16 | 16 |
17 WebKit::WebPeerConnectionHandler* | 17 WebKit::WebPeerConnectionHandler* |
18 MockMediaStreamImpl::CreatePeerConnectionHandler( | 18 MockMediaStreamImpl::CreatePeerConnectionHandler( |
19 WebKit::WebPeerConnectionHandlerClient* client) { | 19 WebKit::WebPeerConnectionHandlerClient* client) { |
20 NOTIMPLEMENTED(); | 20 NOTIMPLEMENTED(); |
21 return NULL; | 21 return NULL; |
22 } | 22 } |
23 | 23 |
24 void MockMediaStreamImpl::ClosePeerConnection() { | 24 void MockMediaStreamImpl::ClosePeerConnection( |
| 25 PeerConnectionHandlerBase* pc_handler) { |
25 } | 26 } |
26 | 27 |
27 webrtc::MediaStreamTrackInterface* | 28 webrtc::MediaStreamTrackInterface* |
28 MockMediaStreamImpl::GetLocalMediaStreamTrack(const std::string& label) { | 29 MockMediaStreamImpl::GetLocalMediaStreamTrack(const std::string& label) { |
29 MockMediaStreamTrackPtrMap::iterator it = mock_local_tracks_.find(label); | 30 MockMediaStreamTrackPtrMap::iterator it = mock_local_tracks_.find(label); |
30 if (it == mock_local_tracks_.end()) | 31 if (it == mock_local_tracks_.end()) |
31 return NULL; | 32 return NULL; |
32 webrtc::MediaStreamTrackInterface* stream = it->second; | 33 webrtc::MediaStreamTrackInterface* stream = it->second; |
33 return stream; | 34 return stream; |
34 } | 35 } |
(...skipping 28 matching lines...) Expand all Loading... |
63 int index) { | 64 int index) { |
64 NOTIMPLEMENTED(); | 65 NOTIMPLEMENTED(); |
65 } | 66 } |
66 | 67 |
67 void MockMediaStreamImpl::AddTrack( | 68 void MockMediaStreamImpl::AddTrack( |
68 const std::string& label, | 69 const std::string& label, |
69 webrtc::MediaStreamTrackInterface* track) { | 70 webrtc::MediaStreamTrackInterface* track) { |
70 mock_local_tracks_.insert( | 71 mock_local_tracks_.insert( |
71 std::pair<std::string, webrtc::MediaStreamTrackInterface*>(label, track)); | 72 std::pair<std::string, webrtc::MediaStreamTrackInterface*>(label, track)); |
72 } | 73 } |
OLD | NEW |