Index: chrome/browser/ui/webui/chromeos/login/locally_managed_user_creation_screen_handler.cc |
diff --git a/chrome/browser/ui/webui/chromeos/login/locally_managed_user_creation_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/locally_managed_user_creation_screen_handler.cc |
index ffa026b45a4a91deb708f92e5cc3367ee1666252..ae3230ddc0c971c2f1018e6d330a631ef2591184 100644 |
--- a/chrome/browser/ui/webui/chromeos/login/locally_managed_user_creation_screen_handler.cc |
+++ b/chrome/browser/ui/webui/chromeos/login/locally_managed_user_creation_screen_handler.cc |
@@ -4,6 +4,7 @@ |
#include "chrome/browser/ui/webui/chromeos/login/locally_managed_user_creation_screen_handler.h" |
+#include "ash/audio/sounds.h" |
#include "base/strings/utf_string_conversions.h" |
#include "base/values.h" |
#include "chrome/browser/chromeos/login/managed/locally_managed_user_creation_flow.h" |
@@ -14,11 +15,14 @@ |
#include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" |
#include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" |
#include "chrome/common/url_constants.h" |
+#include "chromeos/audio/chromeos_sounds.h" |
#include "google_apis/gaia/gaia_auth_util.h" |
+#include "grit/browser_resources.h" |
#include "grit/generated_resources.h" |
#include "net/base/data_url.h" |
#include "net/base/escape.h" |
#include "ui/base/l10n/l10n_util.h" |
+#include "ui/base/resource/resource_bundle.h" |
const char kJsScreenPath[] = "login.LocallyManagedUserCreationScreen"; |
@@ -28,6 +32,12 @@ LocallyManagedUserCreationScreenHandler:: |
LocallyManagedUserCreationScreenHandler() |
: BaseScreenHandler(kJsScreenPath), |
delegate_(NULL) { |
+ 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)); |
} |
LocallyManagedUserCreationScreenHandler:: |
@@ -130,6 +140,11 @@ void LocallyManagedUserCreationScreenHandler::DeclareLocalizedValues( |
builder->Add("takePhoto", IDS_OPTIONS_CHANGE_PICTURE_TAKE_PHOTO); |
builder->Add("discardPhoto", IDS_OPTIONS_CHANGE_PICTURE_DISCARD_PHOTO); |
builder->Add("flipPhoto", IDS_OPTIONS_CHANGE_PICTURE_FLIP_PHOTO); |
+ builder->Add("photoFlippedAccessibleText", |
+ IDS_OPTIONS_PHOTO_FLIP_ACCESSIBLE_TEXT); |
+ builder->Add("photoFlippedBackAccessibleText", |
+ IDS_OPTIONS_PHOTO_FLIPBACK_ACCESSIBLE_TEXT); |
+ |
} |
void LocallyManagedUserCreationScreenHandler::Initialize() {} |
@@ -172,6 +187,10 @@ void LocallyManagedUserCreationScreenHandler::RegisterMessages() { |
AddCallback("supervisedUserPhotoTaken", |
&LocallyManagedUserCreationScreenHandler::HandlePhotoTaken); |
+ AddCallback("supervisedUserPhotoTaken", |
+ &LocallyManagedUserCreationScreenHandler::HandleTakePhoto); |
+ AddCallback("supervisedUserPhotoTaken", |
+ &LocallyManagedUserCreationScreenHandler::HandleDiscardPhoto); |
AddCallback("supervisedUserSelectImage", |
&LocallyManagedUserCreationScreenHandler::HandleSelectImage); |
AddCallback("supervisedUserCheckCameraPresence", |
@@ -391,6 +410,14 @@ void LocallyManagedUserCreationScreenHandler::HandlePhotoTaken |
delegate_->OnPhotoTaken(raw_data); |
} |
+void LocallyManagedUserCreationScreenHandler::HandleTakePhoto() { |
+ ash::PlaySystemSoundIfSpokenFeedback(SOUND_CAMERA_SNAP); |
+} |
+ |
+void LocallyManagedUserCreationScreenHandler::HandleDiscardPhoto() { |
+ ash::PlaySystemSoundIfSpokenFeedback(SOUND_OBJECT_DELETE); |
+} |
+ |
void LocallyManagedUserCreationScreenHandler::HandleCheckCameraPresence() { |
if (!delegate_) |
return; |