Chromium Code Reviews| Index: chrome/browser/ui/webui/chromeos/login/user_image_screen_handler.cc |
| diff --git a/chrome/browser/ui/webui/chromeos/login/user_image_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/user_image_screen_handler.cc |
| index ce27f8cc34968a1bb2fe692c0f29078c4f64c813..bf0dae6d98790bc1561828e37830d3b58611bd44 100644 |
| --- a/chrome/browser/ui/webui/chromeos/login/user_image_screen_handler.cc |
| +++ b/chrome/browser/ui/webui/chromeos/login/user_image_screen_handler.cc |
| @@ -4,7 +4,6 @@ |
| #include "chrome/browser/ui/webui/chromeos/login/user_image_screen_handler.h" |
| -#include "ash/audio/sounds.h" |
| #include "base/command_line.h" |
| #include "base/logging.h" |
| #include "base/metrics/histogram.h" |
| @@ -24,6 +23,10 @@ |
| #include "ui/base/resource/resource_bundle.h" |
| #include "url/gurl.h" |
| +#if defined(USE_ASH) |
| +#include "ash/audio/sounds.h" |
|
oshima
2014/10/30 18:08:41
ash/audio should be easy to componentize. can you
pkotwicz
2014/10/30 21:31:41
I have kicked off the process by sending an email
|
| +#endif |
| + |
| namespace { |
| const char kJsScreenPath[] = "login.UserImageScreen"; |
| @@ -37,12 +40,14 @@ UserImageScreenHandler::UserImageScreenHandler() |
| screen_(NULL), |
| show_on_init_(false), |
| is_ready_(false) { |
| +#if defined(USE_ASH) |
| ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); |
| media::SoundsManager* manager = media::SoundsManager::Get(); |
| manager->Initialize(SOUND_OBJECT_DELETE, |
| bundle.GetRawDataResource(IDR_SOUND_OBJECT_DELETE_WAV)); |
| manager->Initialize(SOUND_CAMERA_SNAP, |
| bundle.GetRawDataResource(IDR_SOUND_CAMERA_SNAP_WAV)); |
| +#endif |
| } |
| UserImageScreenHandler::~UserImageScreenHandler() { |
| @@ -185,11 +190,15 @@ void UserImageScreenHandler::HandlePhotoTaken(const std::string& image_url) { |
| } |
| void UserImageScreenHandler::HandleTakePhoto() { |
| +#if defined(USE_ASH) |
| ash::PlaySystemSoundIfSpokenFeedback(SOUND_CAMERA_SNAP); |
| +#endif |
| } |
| void UserImageScreenHandler::HandleDiscardPhoto() { |
| +#if defined(USE_ASH) |
| ash::PlaySystemSoundIfSpokenFeedback(SOUND_OBJECT_DELETE); |
| +#endif |
| } |
| void UserImageScreenHandler::HandleSelectImage(const std::string& image_url, |