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) { | |
scherkus (not reviewing)
2011/10/31 01:59:13
nit: close braces if function fits on one line {}
Henrik Grunell
2011/10/31 13:17:53
Done.
| |
30 } | |
31 | |
32 bool MockMediaStreamDispatcher::IsStream(const std::string& label) { | |
33 return false; | |
34 } | |
35 | |
36 int MockMediaStreamDispatcher::video_session_id(const std::string& label, | |
37 int index) { | |
38 return -1; | |
39 } | |
40 | |
41 int MockMediaStreamDispatcher::audio_session_id(const std::string& label, | |
42 int index) { | |
43 return -1; | |
44 } | |
OLD | NEW |