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_dispatcher.h" | 5 #include "content/renderer/media/mock_media_stream_dispatcher.h" |
6 | 6 |
7 MockMediaStreamDispatcher::MockMediaStreamDispatcher() | 7 MockMediaStreamDispatcher::MockMediaStreamDispatcher() |
8 : MediaStreamDispatcher(NULL), | 8 : MediaStreamDispatcher(NULL), |
9 request_id_(-1), | 9 request_id_(-1), |
10 event_handler_(NULL), | |
11 components_(NULL), | 10 components_(NULL), |
12 stop_stream_counter_(0) { | 11 stop_stream_counter_(0) { |
13 } | 12 } |
14 | 13 |
15 MockMediaStreamDispatcher::~MockMediaStreamDispatcher() {} | 14 MockMediaStreamDispatcher::~MockMediaStreamDispatcher() {} |
16 | 15 |
17 void MockMediaStreamDispatcher::GenerateStream( | 16 void MockMediaStreamDispatcher::GenerateStream( |
18 int request_id, | 17 int request_id, |
19 MediaStreamDispatcherEventHandler* event_handler, | 18 const base::WeakPtr<MediaStreamDispatcherEventHandler>& event_handler, |
20 media_stream::StreamOptions components, | 19 media_stream::StreamOptions components, |
21 const std::string& security_origin) { | 20 const std::string& security_origin) { |
22 request_id_ = request_id; | 21 request_id_ = request_id; |
23 event_handler_ = event_handler; | 22 event_handler_ = event_handler; |
24 delete components_; | 23 delete components_; |
25 components_ = new media_stream::StreamOptions(components.audio, | 24 components_ = new media_stream::StreamOptions(components.audio, |
26 components.video_option); | 25 components.video_option); |
27 security_origin_ = security_origin; | 26 security_origin_ = security_origin; |
28 } | 27 } |
29 | 28 |
(...skipping 10 matching lines...) Expand all Loading... |
40 int index) { | 39 int index) { |
41 NOTIMPLEMENTED(); | 40 NOTIMPLEMENTED(); |
42 return -1; | 41 return -1; |
43 } | 42 } |
44 | 43 |
45 int MockMediaStreamDispatcher::audio_session_id(const std::string& label, | 44 int MockMediaStreamDispatcher::audio_session_id(const std::string& label, |
46 int index) { | 45 int index) { |
47 NOTIMPLEMENTED(); | 46 NOTIMPLEMENTED(); |
48 return -1; | 47 return -1; |
49 } | 48 } |
OLD | NEW |