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

Side by Side Diff: media/audio/audio_manager.h

Issue 9433006: Remove GetAudioManager and GetMediaStreamManager from ResourceContext. The reason is the content mo… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix deps Created 8 years, 10 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 #ifndef MEDIA_AUDIO_AUDIO_MANAGER_H_ 5 #ifndef MEDIA_AUDIO_AUDIO_MANAGER_H_
6 #define MEDIA_AUDIO_AUDIO_MANAGER_H_ 6 #define MEDIA_AUDIO_AUDIO_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 13 matching lines...) Expand all
24 // objects. Provides some convenience functions that avoid the need to provide 24 // objects. Provides some convenience functions that avoid the need to provide
25 // iterators over the existing streams. 25 // iterators over the existing streams.
26 class MEDIA_EXPORT AudioManager { 26 class MEDIA_EXPORT AudioManager {
27 public: 27 public:
28 virtual ~AudioManager(); 28 virtual ~AudioManager();
29 29
30 // Use to construct the audio manager. 30 // Use to construct the audio manager.
31 // NOTE: There should only be one instance. 31 // NOTE: There should only be one instance.
32 static AudioManager* Create(); 32 static AudioManager* Create();
33 33
34 // Returns the AudioManager object if it's been created, NULL otherwise.
35 static AudioManager* Get();
36
34 // Returns true if the OS reports existence of audio devices. This does not 37 // Returns true if the OS reports existence of audio devices. This does not
35 // guarantee that the existing devices support all formats and sample rates. 38 // guarantee that the existing devices support all formats and sample rates.
36 virtual bool HasAudioOutputDevices() = 0; 39 virtual bool HasAudioOutputDevices() = 0;
37 40
38 // Returns true if the OS reports existence of audio recording devices. This 41 // Returns true if the OS reports existence of audio recording devices. This
39 // does not guarantee that the existing devices support all formats and 42 // does not guarantee that the existing devices support all formats and
40 // sample rates. 43 // sample rates.
41 virtual bool HasAudioInputDevices() = 0; 44 virtual bool HasAudioInputDevices() = 0;
42 45
43 // Returns a human readable string for the model/make of the active audio 46 // Returns a human readable string for the model/make of the active audio
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 AudioManager(); 121 AudioManager();
119 122
120 // Called from Create() to initialize the instance. 123 // Called from Create() to initialize the instance.
121 virtual void Init() = 0; 124 virtual void Init() = 0;
122 125
123 private: 126 private:
124 DISALLOW_COPY_AND_ASSIGN(AudioManager); 127 DISALLOW_COPY_AND_ASSIGN(AudioManager);
125 }; 128 };
126 129
127 #endif // MEDIA_AUDIO_AUDIO_MANAGER_H_ 130 #endif // MEDIA_AUDIO_AUDIO_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698