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

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

Issue 1317033006: Linux: Do not use a hard coded app name for PulseAudio output. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « chrome/browser/chrome_browser_main_linux.cc ('k') | media/audio/audio_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 #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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 // Similar to Create() except uses a FakeAudioLogFactory for testing. 55 // Similar to Create() except uses a FakeAudioLogFactory for testing.
56 static AudioManager* CreateForTesting(); 56 static AudioManager* CreateForTesting();
57 57
58 // Enables the hang monitor for the AudioManager once it's created. Must be 58 // Enables the hang monitor for the AudioManager once it's created. Must be
59 // called before the AudioManager is created. CreateWithHangTimer() requires 59 // called before the AudioManager is created. CreateWithHangTimer() requires
60 // either switches::kEnableAudioHangMonitor to be present or this to have been 60 // either switches::kEnableAudioHangMonitor to be present or this to have been
61 // called previously to start the hang monitor. Does nothing on OSX. 61 // called previously to start the hang monitor. Does nothing on OSX.
62 static void EnableHangMonitor(); 62 static void EnableHangMonitor();
63 63
64 #if defined(OS_LINUX)
65 // Sets the name of the audio source as seen by external apps. Only actually
66 // used with PulseAudio as of this writing.
67 static void SetGlobalAppName(const std::string& app_name);
68
69 // Returns the app name or an empty string if it is not set.
70 static const std::string& GetGlobalAppName();
71 #endif
72
64 // Should only be used for testing. Resets a previously-set 73 // Should only be used for testing. Resets a previously-set
65 // AudioManagerFactory. The instance of AudioManager is not affected. 74 // AudioManagerFactory. The instance of AudioManager is not affected.
66 static void ResetFactoryForTesting(); 75 static void ResetFactoryForTesting();
67 76
68 // Returns the pointer to the last created instance, or NULL if not yet 77 // Returns the pointer to the last created instance, or NULL if not yet
69 // created. This is a utility method for the code outside of media directory, 78 // created. This is a utility method for the code outside of media directory,
70 // like src/chrome. 79 // like src/chrome.
71 static AudioManager* Get(); 80 static AudioManager* Get();
72 81
73 // Returns true if the OS reports existence of audio devices. This does not 82 // Returns true if the OS reports existence of audio devices. This does not
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 protected: 223 protected:
215 AudioManager(); 224 AudioManager();
216 225
217 private: 226 private:
218 DISALLOW_COPY_AND_ASSIGN(AudioManager); 227 DISALLOW_COPY_AND_ASSIGN(AudioManager);
219 }; 228 };
220 229
221 } // namespace media 230 } // namespace media
222 231
223 #endif // MEDIA_AUDIO_AUDIO_MANAGER_H_ 232 #endif // MEDIA_AUDIO_AUDIO_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main_linux.cc ('k') | media/audio/audio_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698