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/browser/renderer_host/media/media_stream_manager.h" | 5 #include "content/browser/renderer_host/media/media_stream_manager.h" |
6 | 6 |
7 #include <list> | 7 #include <list> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 } | 169 } |
170 | 170 |
171 MediaStreamManager::~MediaStreamManager() { | 171 MediaStreamManager::~MediaStreamManager() { |
172 DCHECK(requests_.empty()); | 172 DCHECK(requests_.empty()); |
173 DCHECK(!device_thread_.get()); | 173 DCHECK(!device_thread_.get()); |
174 DCHECK(!io_loop_); | 174 DCHECK(!io_loop_); |
175 } | 175 } |
176 | 176 |
177 VideoCaptureManager* MediaStreamManager::video_capture_manager() { | 177 VideoCaptureManager* MediaStreamManager::video_capture_manager() { |
178 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 178 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
179 DCHECK(video_capture_manager_); | 179 DCHECK(video_capture_manager_.get()); |
180 return video_capture_manager_; | 180 return video_capture_manager_.get(); |
181 } | 181 } |
182 | 182 |
183 AudioInputDeviceManager* MediaStreamManager::audio_input_device_manager() { | 183 AudioInputDeviceManager* MediaStreamManager::audio_input_device_manager() { |
184 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 184 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
185 DCHECK(audio_input_device_manager_); | 185 DCHECK(audio_input_device_manager_.get()); |
186 return audio_input_device_manager_; | 186 return audio_input_device_manager_.get(); |
187 } | 187 } |
188 | 188 |
189 std::string MediaStreamManager::MakeMediaAccessRequest( | 189 std::string MediaStreamManager::MakeMediaAccessRequest( |
190 int render_process_id, | 190 int render_process_id, |
191 int render_view_id, | 191 int render_view_id, |
192 const StreamOptions& options, | 192 const StreamOptions& options, |
193 const GURL& security_origin, | 193 const GURL& security_origin, |
194 const MediaRequestResponseCallback& callback) { | 194 const MediaRequestResponseCallback& callback) { |
195 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 195 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
196 // Create a new request based on options. | 196 // Create a new request based on options. |
(...skipping 900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1097 } | 1097 } |
1098 | 1098 |
1099 // Always do enumeration even though some enumeration is in progress, | 1099 // Always do enumeration even though some enumeration is in progress, |
1100 // because those enumeration commands could be sent before these devices | 1100 // because those enumeration commands could be sent before these devices |
1101 // change. | 1101 // change. |
1102 ++active_enumeration_ref_count_[stream_type]; | 1102 ++active_enumeration_ref_count_[stream_type]; |
1103 GetDeviceManager(stream_type)->EnumerateDevices(stream_type); | 1103 GetDeviceManager(stream_type)->EnumerateDevices(stream_type); |
1104 } | 1104 } |
1105 | 1105 |
1106 } // namespace content | 1106 } // namespace content |
OLD | NEW |