| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "chrome/browser/ui/webui/options/chromeos/change_picture_options_handle
r.h" | 5 #include "chrome/browser/ui/webui/options/chromeos/change_picture_options_handle
r.h" |
| 6 | 6 |
| 7 #include "ash/audio/sounds.h" | 7 #include "ash/audio/sounds.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 &file_type_info, | 208 &file_type_info, |
| 209 0, | 209 0, |
| 210 FILE_PATH_LITERAL(""), | 210 FILE_PATH_LITERAL(""), |
| 211 GetBrowserWindow(), | 211 GetBrowserWindow(), |
| 212 NULL); | 212 NULL); |
| 213 } | 213 } |
| 214 | 214 |
| 215 void ChangePictureOptionsHandler::HandleTakePhoto( | 215 void ChangePictureOptionsHandler::HandleTakePhoto( |
| 216 const base::ListValue* args) { | 216 const base::ListValue* args) { |
| 217 DCHECK(args->empty()); | 217 DCHECK(args->empty()); |
| 218 #if !defined(USE_ATHENA) |
| 219 // crbug.com/408733 |
| 218 ash::PlaySystemSoundIfSpokenFeedback(SOUND_CAMERA_SNAP); | 220 ash::PlaySystemSoundIfSpokenFeedback(SOUND_CAMERA_SNAP); |
| 221 #endif |
| 219 } | 222 } |
| 220 | 223 |
| 221 void ChangePictureOptionsHandler::HandleDiscardPhoto( | 224 void ChangePictureOptionsHandler::HandleDiscardPhoto( |
| 222 const base::ListValue* args) { | 225 const base::ListValue* args) { |
| 223 DCHECK(args->empty()); | 226 DCHECK(args->empty()); |
| 227 #if !defined(USE_ATHENA) |
| 224 ash::PlaySystemSoundIfSpokenFeedback(SOUND_OBJECT_DELETE); | 228 ash::PlaySystemSoundIfSpokenFeedback(SOUND_OBJECT_DELETE); |
| 229 #endif |
| 225 } | 230 } |
| 226 | 231 |
| 227 void ChangePictureOptionsHandler::HandlePhotoTaken( | 232 void ChangePictureOptionsHandler::HandlePhotoTaken( |
| 228 const base::ListValue* args) { | 233 const base::ListValue* args) { |
| 229 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 234 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 230 std::string image_url; | 235 std::string image_url; |
| 231 if (!args || args->GetSize() != 1 || !args->GetString(0, &image_url)) | 236 if (!args || args->GetSize() != 1 || !args->GetString(0, &image_url)) |
| 232 NOTREACHED(); | 237 NOTREACHED(); |
| 233 DCHECK(!image_url.empty()); | 238 DCHECK(!image_url.empty()); |
| 234 | 239 |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 user_manager::User* ChangePictureOptionsHandler::GetUser() const { | 479 user_manager::User* ChangePictureOptionsHandler::GetUser() const { |
| 475 Profile* profile = Profile::FromWebUI(web_ui()); | 480 Profile* profile = Profile::FromWebUI(web_ui()); |
| 476 user_manager::User* user = ProfileHelper::Get()->GetUserByProfile(profile); | 481 user_manager::User* user = ProfileHelper::Get()->GetUserByProfile(profile); |
| 477 if (!user) | 482 if (!user) |
| 478 return user_manager::UserManager::Get()->GetActiveUser(); | 483 return user_manager::UserManager::Get()->GetActiveUser(); |
| 479 return user; | 484 return user; |
| 480 } | 485 } |
| 481 | 486 |
| 482 } // namespace options | 487 } // namespace options |
| 483 } // namespace chromeos | 488 } // namespace chromeos |
| OLD | NEW |