OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "content/renderer/media/mock_media_stream_dispatcher.h" |
| 6 |
| 7 MockMediaStreamDispatcher::MockMediaStreamDispatcher() |
| 8 : MediaStreamDispatcher(NULL), |
| 9 request_id_(-1), |
| 10 event_handler_(NULL), |
| 11 components_(NULL) { |
| 12 } |
| 13 |
| 14 MockMediaStreamDispatcher::~MockMediaStreamDispatcher() {} |
| 15 |
| 16 void MockMediaStreamDispatcher::GenerateStream( |
| 17 int request_id, |
| 18 MediaStreamDispatcherEventHandler* event_handler, |
| 19 media_stream::StreamOptions components, |
| 20 const std::string& security_origin) { |
| 21 request_id_ = request_id; |
| 22 event_handler_ = event_handler; |
| 23 delete components_; |
| 24 components_ = new media_stream::StreamOptions(components.audio, |
| 25 components.video_option); |
| 26 security_origin_ = security_origin; |
| 27 } |
| 28 |
| 29 void MockMediaStreamDispatcher::StopStream(const std::string& label) {} |
| 30 |
| 31 bool MockMediaStreamDispatcher::IsStream(const std::string& label) { |
| 32 return false; |
| 33 } |
| 34 |
| 35 int MockMediaStreamDispatcher::video_session_id(const std::string& label, |
| 36 int index) { |
| 37 return -1; |
| 38 } |
| 39 |
| 40 int MockMediaStreamDispatcher::audio_session_id(const std::string& label, |
| 41 int index) { |
| 42 return -1; |
| 43 } |
OLD | NEW |