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

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

Issue 1362093002: Re-land: Add localized default audio device names. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Exclude media_resource_provider on iOS. Created 5 years, 2 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 | « media/audio/audio_manager.h ('k') | media/audio/audio_manager_base.h » ('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 #include "media/audio/audio_manager.h" 5 #include "media/audio/audio_manager.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/alias.h" 10 #include "base/debug/alias.h"
11 #include "base/lazy_instance.h" 11 #include "base/lazy_instance.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/message_loop/message_loop.h" 13 #include "base/message_loop/message_loop.h"
14 #include "base/power_monitor/power_monitor.h" 14 #include "base/power_monitor/power_monitor.h"
15 #include "build/build_config.h" 15 #include "build/build_config.h"
16 #include "media/audio/audio_manager_factory.h" 16 #include "media/audio/audio_manager_factory.h"
17 #include "media/audio/fake_audio_log_factory.h" 17 #include "media/audio/fake_audio_log_factory.h"
18 #include "media/base/media_resources.h"
18 #include "media/base/media_switches.h" 19 #include "media/base/media_switches.h"
19 20
20 #if defined(OS_WIN) 21 #if defined(OS_WIN)
21 #include "base/win/scoped_com_initializer.h" 22 #include "base/win/scoped_com_initializer.h"
22 #endif 23 #endif
23 24
24 namespace media { 25 namespace media {
25 namespace { 26 namespace {
26 27
27 // The singleton instance of AudioManager. This is set when Create() is called. 28 // The singleton instance of AudioManager. This is set when Create() is called.
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 const std::string& AudioManager::GetGlobalAppName() { 277 const std::string& AudioManager::GetGlobalAppName() {
277 return g_helper.Pointer()->app_name(); 278 return g_helper.Pointer()->app_name();
278 } 279 }
279 #endif 280 #endif
280 281
281 // static 282 // static
282 AudioManager* AudioManager::Get() { 283 AudioManager* AudioManager::Get() {
283 return g_last_created; 284 return g_last_created;
284 } 285 }
285 286
287 // static
288 std::string AudioManager::GetDefaultDeviceName() {
289 return GetLocalizedStringUTF8(DEFAULT_AUDIO_DEVICE_NAME);
290 }
291
292 // static
293 std::string AudioManager::GetCommunicationsDeviceName() {
294 #if defined(OS_WIN)
295 return GetLocalizedStringUTF8(COMMUNICATIONS_AUDIO_DEVICE_NAME);
296 #else
297 NOTREACHED();
298 return "";
299 #endif
300 }
301
286 } // namespace media 302 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/audio_manager.h ('k') | media/audio/audio_manager_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698