OLD | NEW |
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/ash_switches.h" | |
8 #include "ash/common/accessibility_delegate.h" | 7 #include "ash/common/accessibility_delegate.h" |
| 8 #include "ash/common/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(SoundsManager::SoundKey key) { | 16 bool PlaySystemSoundAlways(SoundsManager::SoundKey key) { |
17 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 17 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
18 switches::kAshDisableSystemSounds)) | 18 switches::kAshDisableSystemSounds)) |
(...skipping 10 matching lines...) Expand all Loading... |
29 return SoundsManager::Get()->Play(key); | 29 return SoundsManager::Get()->Play(key); |
30 | 30 |
31 Shell* shell = Shell::GetInstance(); | 31 Shell* shell = Shell::GetInstance(); |
32 if (!shell->accessibility_delegate()->IsSpokenFeedbackEnabled()) | 32 if (!shell->accessibility_delegate()->IsSpokenFeedbackEnabled()) |
33 return false; | 33 return false; |
34 | 34 |
35 return SoundsManager::Get()->Play(key); | 35 return SoundsManager::Get()->Play(key); |
36 } | 36 } |
37 | 37 |
38 } // namespace ash | 38 } // namespace ash |
OLD | NEW |