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/chromeos/accessibility/accessibility_manager.h" | 5 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" |
6 | 6 |
7 #include "ash/audio/sounds.h" | 7 #include "ash/audio/sounds.h" |
8 #include "ash/autoclick/autoclick_controller.h" | 8 #include "ash/autoclick/autoclick_controller.h" |
9 #include "ash/high_contrast/high_contrast_controller.h" | 9 #include "ash/high_contrast/high_contrast_controller.h" |
10 #include "ash/metrics/user_metrics_recorder.h" | 10 #include "ash/metrics/user_metrics_recorder.h" |
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
367 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); | 367 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); |
368 media::SoundsManager* manager = media::SoundsManager::Get(); | 368 media::SoundsManager* manager = media::SoundsManager::Get(); |
369 manager->Initialize(SOUND_SHUTDOWN, | 369 manager->Initialize(SOUND_SHUTDOWN, |
370 bundle.GetRawDataResource(IDR_SOUND_SHUTDOWN_WAV)); | 370 bundle.GetRawDataResource(IDR_SOUND_SHUTDOWN_WAV)); |
371 manager->Initialize( | 371 manager->Initialize( |
372 SOUND_SPOKEN_FEEDBACK_ENABLED, | 372 SOUND_SPOKEN_FEEDBACK_ENABLED, |
373 bundle.GetRawDataResource(IDR_SOUND_SPOKEN_FEEDBACK_ENABLED_WAV)); | 373 bundle.GetRawDataResource(IDR_SOUND_SPOKEN_FEEDBACK_ENABLED_WAV)); |
374 manager->Initialize( | 374 manager->Initialize( |
375 SOUND_SPOKEN_FEEDBACK_DISABLED, | 375 SOUND_SPOKEN_FEEDBACK_DISABLED, |
376 bundle.GetRawDataResource(IDR_SOUND_SPOKEN_FEEDBACK_DISABLED_WAV)); | 376 bundle.GetRawDataResource(IDR_SOUND_SPOKEN_FEEDBACK_DISABLED_WAV)); |
377 manager->Initialize(SOUND_PASSTHROUGH, | |
dmazzoni
2014/07/25 20:28:14
This isn't ideal since you're initializing the sou
lisayin
2014/07/25 23:09:30
In the latest CL, I used the manager and delegate
| |
378 bundle.GetRawDataResource(IDR_SOUND_PASSTHROUGH_WAV)); | |
377 } | 379 } |
378 | 380 |
379 AccessibilityManager::~AccessibilityManager() { | 381 AccessibilityManager::~AccessibilityManager() { |
380 CHECK(this == g_accessibility_manager); | 382 CHECK(this == g_accessibility_manager); |
381 AccessibilityStatusEventDetails details( | 383 AccessibilityStatusEventDetails details( |
382 ACCESSIBILITY_MANAGER_SHUTDOWN, | 384 ACCESSIBILITY_MANAGER_SHUTDOWN, |
383 false, | 385 false, |
384 ash::A11Y_NOTIFICATION_NONE); | 386 ash::A11Y_NOTIFICATION_NONE); |
385 NotifyAccessibilityStatusChanged(details); | 387 NotifyAccessibilityStatusChanged(details); |
386 input_method::InputMethodManager::Get()->RemoveObserver(this); | 388 input_method::InputMethodManager::Get()->RemoveObserver(this); |
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1106 chrome_vox_loaded_on_lock_screen_; | 1108 chrome_vox_loaded_on_lock_screen_; |
1107 } | 1109 } |
1108 | 1110 |
1109 void AccessibilityManager::PostUnloadChromeVox(Profile* profile) { | 1111 void AccessibilityManager::PostUnloadChromeVox(Profile* profile) { |
1110 // Do any teardown work needed immediately after ChromeVox actually unloads. | 1112 // Do any teardown work needed immediately after ChromeVox actually unloads. |
1111 if (system_sounds_enabled_) | 1113 if (system_sounds_enabled_) |
1112 ash::PlaySystemSoundAlways(SOUND_SPOKEN_FEEDBACK_DISABLED); | 1114 ash::PlaySystemSoundAlways(SOUND_SPOKEN_FEEDBACK_DISABLED); |
1113 } | 1115 } |
1114 | 1116 |
1115 } // namespace chromeos | 1117 } // namespace chromeos |
OLD | NEW |