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) { | |
26 } | 25 } |
27 | 26 |
28 webrtc::MediaStreamTrackInterface* | 27 webrtc::MediaStreamTrackInterface* |
29 MockMediaStreamImpl::GetLocalMediaStreamTrack(const std::string& label) { | 28 MockMediaStreamImpl::GetLocalMediaStreamTrack(const std::string& label) { |
30 MockMediaStreamTrackPtrMap::iterator it = mock_local_tracks_.find(label); | 29 MockMediaStreamTrackPtrMap::iterator it = mock_local_tracks_.find(label); |
31 if (it == mock_local_tracks_.end()) | 30 if (it == mock_local_tracks_.end()) |
32 return NULL; | 31 return NULL; |
33 webrtc::MediaStreamTrackInterface* stream = it->second; | 32 webrtc::MediaStreamTrackInterface* stream = it->second; |
34 return stream; | 33 return stream; |
35 } | 34 } |
(...skipping 28 matching lines...) Expand all Loading... |
64 int index) { | 63 int index) { |
65 NOTIMPLEMENTED(); | 64 NOTIMPLEMENTED(); |
66 } | 65 } |
67 | 66 |
68 void MockMediaStreamImpl::AddTrack( | 67 void MockMediaStreamImpl::AddTrack( |
69 const std::string& label, | 68 const std::string& label, |
70 webrtc::MediaStreamTrackInterface* track) { | 69 webrtc::MediaStreamTrackInterface* track) { |
71 mock_local_tracks_.insert( | 70 mock_local_tracks_.insert( |
72 std::pair<std::string, webrtc::MediaStreamTrackInterface*>(label, track)); | 71 std::pair<std::string, webrtc::MediaStreamTrackInterface*>(label, track)); |
73 } | 72 } |
OLD | NEW |