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

Side by Side Diff: ash/audio/sounds.cc

Issue 684783004: Prefix CommandLine usage with base namespace (Part 4: ash/) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 6 years, 1 month 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 | « ash/ash_touch_exploration_manager_chromeos.cc ('k') | ash/display/display_controller.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ash/audio/sounds.h" 5 #include "ash/audio/sounds.h"
6 6
7 #include "ash/accessibility_delegate.h" 7 #include "ash/accessibility_delegate.h"
8 #include "ash/ash_switches.h" 8 #include "ash/ash_switches.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 11
12 using media::SoundsManager; 12 using media::SoundsManager;
13 13
14 namespace ash { 14 namespace ash {
15 15
16 bool PlaySystemSoundAlways(media::SoundsManager::SoundKey key) { 16 bool PlaySystemSoundAlways(media::SoundsManager::SoundKey key) {
17 return SoundsManager::Get()->Play(key); 17 return SoundsManager::Get()->Play(key);
18 } 18 }
19 19
20 bool PlaySystemSoundIfSpokenFeedback(SoundsManager::SoundKey key) { 20 bool PlaySystemSoundIfSpokenFeedback(SoundsManager::SoundKey key) {
21 CommandLine* cl = CommandLine::ForCurrentProcess(); 21 base::CommandLine* cl = base::CommandLine::ForCurrentProcess();
22 if (cl->HasSwitch(switches::kAshEnableSystemSounds)) 22 if (cl->HasSwitch(switches::kAshEnableSystemSounds))
23 return SoundsManager::Get()->Play(key); 23 return SoundsManager::Get()->Play(key);
24 24
25 Shell* shell = Shell::GetInstance(); 25 Shell* shell = Shell::GetInstance();
26 if (!shell->accessibility_delegate()->IsSpokenFeedbackEnabled()) 26 if (!shell->accessibility_delegate()->IsSpokenFeedbackEnabled())
27 return false; 27 return false;
28 return SoundsManager::Get()->Play(key); 28 return SoundsManager::Get()->Play(key);
29 } 29 }
30 30
31 } // namespace ash 31 } // namespace ash
OLDNEW
« no previous file with comments | « ash/ash_touch_exploration_manager_chromeos.cc ('k') | ash/display/display_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698