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

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

Issue 10790121: First step towards moving AudioDevice from content/ to media/audio. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update comments after closing ppapi bug Created 8 years, 4 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
« no previous file with comments | « no previous file | content/browser/renderer_host/media/audio_input_device_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // AudioInputDeviceManager manages the audio input devices. In particular it 5 // AudioInputDeviceManager manages the audio input devices. In particular it
6 // communicates with MediaStreamManager and AudioInputRendererHost on the 6 // communicates with MediaStreamManager and AudioInputRendererHost on the
7 // browser IO thread, handles queries like enumerate/open/close from 7 // browser IO thread, handles queries like enumerate/open/close from
8 // MediaStreamManager and start/stop from AudioInputRendererHost. 8 // MediaStreamManager and start/stop from AudioInputRendererHost.
9 // The work for enumerate/open/close is handled asynchronously on Media Stream 9 // The work for enumerate/open/close is handled asynchronously on Media Stream
10 // device thread, while start/stop are synchronous on the IO thread. 10 // device thread, while start/stop are synchronous on the IO thread.
(...skipping 20 matching lines...) Expand all
31 31
32 class CONTENT_EXPORT AudioInputDeviceManager 32 class CONTENT_EXPORT AudioInputDeviceManager
33 : public base::RefCountedThreadSafe<AudioInputDeviceManager>, 33 : public base::RefCountedThreadSafe<AudioInputDeviceManager>,
34 public MediaStreamProvider { 34 public MediaStreamProvider {
35 public: 35 public:
36 // Calling Start() with this kFakeOpenSessionId will open the default device, 36 // Calling Start() with this kFakeOpenSessionId will open the default device,
37 // even though Open() has not been called. This is used to be able to use the 37 // even though Open() has not been called. This is used to be able to use the
38 // AudioInputDeviceManager before MediaStream is implemented. 38 // AudioInputDeviceManager before MediaStream is implemented.
39 static const int kFakeOpenSessionId; 39 static const int kFakeOpenSessionId;
40 40
41 static const int kInvalidSessionId;
42 static const char kInvalidDeviceId[];
43
44 explicit AudioInputDeviceManager(media::AudioManager* audio_manager); 41 explicit AudioInputDeviceManager(media::AudioManager* audio_manager);
45 42
46 // MediaStreamProvider implementation, called on IO thread. 43 // MediaStreamProvider implementation, called on IO thread.
47 virtual void Register(MediaStreamProviderListener* listener, 44 virtual void Register(MediaStreamProviderListener* listener,
48 base::MessageLoopProxy* device_thread_loop) OVERRIDE; 45 base::MessageLoopProxy* device_thread_loop) OVERRIDE;
49 virtual void Unregister() OVERRIDE; 46 virtual void Unregister() OVERRIDE;
50 virtual void EnumerateDevices() OVERRIDE; 47 virtual void EnumerateDevices() OVERRIDE;
51 virtual int Open(const StreamDeviceInfo& device) OVERRIDE; 48 virtual int Open(const StreamDeviceInfo& device) OVERRIDE;
52 virtual void Close(int session_id) OVERRIDE; 49 virtual void Close(int session_id) OVERRIDE;
53 50
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 85
89 // The message loop of media stream device thread that this object runs on. 86 // The message loop of media stream device thread that this object runs on.
90 scoped_refptr<base::MessageLoopProxy> device_loop_; 87 scoped_refptr<base::MessageLoopProxy> device_loop_;
91 88
92 DISALLOW_COPY_AND_ASSIGN(AudioInputDeviceManager); 89 DISALLOW_COPY_AND_ASSIGN(AudioInputDeviceManager);
93 }; 90 };
94 91
95 } // namespace media_stream 92 } // namespace media_stream
96 93
97 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_DEVICE_MANAGER_H_ 94 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_DEVICE_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/media/audio_input_device_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698