Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1018)

Side by Side Diff: content/browser/renderer_host/media/media_stream_manager.h

Issue 17444005: Remove MediaStreamDeviceThread in favor of using AudioThread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix one more test. Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 // MediaStreamManager is used to open/enumerate media capture devices (video 5 // MediaStreamManager is used to open/enumerate media capture devices (video
6 // supported now). Call flow: 6 // supported now). Call flow:
7 // 1. GenerateStream is called when a render process wants to use a capture 7 // 1. GenerateStream is called when a render process wants to use a capture
8 // device. 8 // device.
9 // 2. MediaStreamManager will ask MediaStreamUIController for permission to 9 // 2. MediaStreamManager will ask MediaStreamUIController for permission to
10 // use devices and for which device to use. 10 // use devices and for which device to use.
(...skipping 17 matching lines...) Expand all
28 28
29 #include "base/basictypes.h" 29 #include "base/basictypes.h"
30 #include "base/memory/scoped_ptr.h" 30 #include "base/memory/scoped_ptr.h"
31 #include "base/memory/ref_counted.h" 31 #include "base/memory/ref_counted.h"
32 #include "base/message_loop.h" 32 #include "base/message_loop.h"
33 #include "base/system_monitor/system_monitor.h" 33 #include "base/system_monitor/system_monitor.h"
34 #include "content/browser/renderer_host/media/media_stream_provider.h" 34 #include "content/browser/renderer_host/media/media_stream_provider.h"
35 #include "content/common/media/media_stream_options.h" 35 #include "content/common/media/media_stream_options.h"
36 #include "content/common/content_export.h" 36 #include "content/common/content_export.h"
37 37
38 namespace base {
39 class Thread;
40 }
41
42 namespace media { 38 namespace media {
43 class AudioManager; 39 class AudioManager;
44 } 40 }
45 41
46 namespace content { 42 namespace content {
47 43
48 class AudioInputDeviceManager; 44 class AudioInputDeviceManager;
49 class FakeMediaStreamUIProxy; 45 class FakeMediaStreamUIProxy;
50 class MediaStreamDeviceSettings; 46 class MediaStreamDeviceSettings;
51 class MediaStreamRequester; 47 class MediaStreamRequester;
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 void SendCachedDeviceList(EnumerationCache* cache, const std::string& label); 195 void SendCachedDeviceList(EnumerationCache* cache, const std::string& label);
200 196
201 // Stop the request of enumerating devices indentified by |label|. 197 // Stop the request of enumerating devices indentified by |label|.
202 void StopEnumerateDevices(const std::string& label); 198 void StopEnumerateDevices(const std::string& label);
203 199
204 // Helpers to start and stop monitoring devices. 200 // Helpers to start and stop monitoring devices.
205 void StartMonitoring(); 201 void StartMonitoring();
206 void StopMonitoring(); 202 void StopMonitoring();
207 203
208 // Device thread shared by VideoCaptureManager and AudioInputDeviceManager. 204 // Device thread shared by VideoCaptureManager and AudioInputDeviceManager.
209 scoped_ptr<base::Thread> device_thread_; 205 scoped_refptr<base::MessageLoopProxy> device_loop_;
210 206
211 media::AudioManager* const audio_manager_; // not owned 207 media::AudioManager* const audio_manager_; // not owned
212 scoped_refptr<AudioInputDeviceManager> audio_input_device_manager_; 208 scoped_refptr<AudioInputDeviceManager> audio_input_device_manager_;
213 scoped_refptr<VideoCaptureManager> video_capture_manager_; 209 scoped_refptr<VideoCaptureManager> video_capture_manager_;
214 210
215 // Indicator of device monitoring state. 211 // Indicator of device monitoring state.
216 bool monitoring_started_; 212 bool monitoring_started_;
217 213
218 // Stores most recently enumerated device lists. The cache is cleared when 214 // Stores most recently enumerated device lists. The cache is cleared when
219 // monitoring is stopped or there is no request for that type of device. 215 // monitoring is stopped or there is no request for that type of device.
(...skipping 15 matching lines...) Expand all
235 231
236 bool use_fake_ui_; 232 bool use_fake_ui_;
237 scoped_ptr<FakeMediaStreamUIProxy> fake_ui_; 233 scoped_ptr<FakeMediaStreamUIProxy> fake_ui_;
238 234
239 DISALLOW_COPY_AND_ASSIGN(MediaStreamManager); 235 DISALLOW_COPY_AND_ASSIGN(MediaStreamManager);
240 }; 236 };
241 237
242 } // namespace content 238 } // namespace content
243 239
244 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_MANAGER_H_ 240 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698