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 3 // found in the LICENSE file. 4 5 #ifndef ASH_AUDIO_SOUNDS_H_ 6 #define ASH_AUDIO_SOUNDS_H_ 7 8 #include "ash/ash_export.h" 9 #include "media/audio/sounds/sounds_manager.h" 10 11 namespace ash { 12 13 // A wrapper around media::SoundsManager::Play() method, which plays sound 14 // identified by |key|. Returns true when sound is successfully played. 15 ASH_EXPORT bool PlaySystemSoundAlways(media::SoundsManager::SoundKey key); 16 17 // A wrapper around media::SoundsManager::Play() method, which plays 18 // sound identified by |key| iff at least one of the following 19 // conditions is true: 20 // * ash::switches::kAshEnableSystemSounds flag is set 21 // * spoken feedback is enabled 22 // Returns true when sound is succesfully played. 23 ASH_EXPORT bool PlaySystemSoundIfSpokenFeedback( 24 media::SoundsManager::SoundKey key); 25 26 } // namespace ash 27 28 #endif // ASH_AUDIO_SOUNDS_H_ 29