| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/ash/chrome_shell_delegate.h" | 5 #include "chrome/browser/ui/ash/chrome_shell_delegate.h" |
| 6 | 6 |
| 7 #include "ash/accelerators/magnifier_key_scroller.h" | 7 #include "ash/accelerators/magnifier_key_scroller.h" |
| 8 #include "ash/accelerators/spoken_feedback_toggler.h" | 8 #include "ash/accelerators/spoken_feedback_toggler.h" |
| 9 #include "ash/accessibility_delegate.h" | 9 #include "ash/accessibility_delegate.h" |
| 10 #include "ash/wm/mru_window_tracker.h" | 10 #include "ash/wm/mru_window_tracker.h" |
| 11 #include "ash/wm/window_util.h" | 11 #include "ash/wm/window_util.h" |
| 12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
| 13 #include "base/prefs/pref_service.h" | 13 #include "base/prefs/pref_service.h" |
| 14 #include "chrome/browser/app_mode/app_mode_utils.h" | 14 #include "chrome/browser/app_mode/app_mode_utils.h" |
| 15 #include "chrome/browser/chrome_notification_types.h" | 15 #include "chrome/browser/chrome_notification_types.h" |
| 16 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" | 16 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" |
| 17 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" | 17 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" |
| 18 #include "chrome/browser/chromeos/background/ash_user_wallpaper_delegate.h" | 18 #include "chrome/browser/chromeos/background/ash_user_wallpaper_delegate.h" |
| 19 #include "chrome/browser/chromeos/display/display_configuration_observer.h" | 19 #include "chrome/browser/chromeos/display/display_configuration_observer.h" |
| 20 #include "chrome/browser/chromeos/display/display_preferences.h" | 20 #include "chrome/browser/chromeos/display/display_preferences.h" |
| 21 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 21 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 22 #include "chrome/browser/profiles/profile.h" | 22 #include "chrome/browser/profiles/profile.h" |
| 23 #include "chrome/browser/profiles/profile_manager.h" | 23 #include "chrome/browser/profiles/profile_manager.h" |
| 24 #include "chrome/browser/signin/signin_error_notifier_factory_ash.h" | 24 #include "chrome/browser/signin/signin_error_notifier_factory_ash.h" |
| 25 #include "chrome/browser/speech/tts_controller.h" | 25 #include "chrome/browser/speech/tts_controller.h" |
| 26 #include "chrome/browser/sync/sync_error_notifier_factory_ash.h" | 26 #include "chrome/browser/sync/sync_error_notifier_factory_ash.h" |
| 27 #include "chrome/browser/ui/ash/accessibility/automation_manager_ash.h" |
| 27 #include "chrome/browser/ui/ash/chrome_new_window_delegate_chromeos.h" | 28 #include "chrome/browser/ui/ash/chrome_new_window_delegate_chromeos.h" |
| 28 #include "chrome/browser/ui/ash/media_delegate_chromeos.h" | 29 #include "chrome/browser/ui/ash/media_delegate_chromeos.h" |
| 29 #include "chrome/browser/ui/ash/session_state_delegate_chromeos.h" | 30 #include "chrome/browser/ui/ash/session_state_delegate_chromeos.h" |
| 30 #include "chrome/browser/ui/ash/system_tray_delegate_chromeos.h" | 31 #include "chrome/browser/ui/ash/system_tray_delegate_chromeos.h" |
| 31 #include "chrome/browser/ui/aura/accessibility/automation_manager_aura.h" | |
| 32 #include "chrome/browser/ui/browser.h" | 32 #include "chrome/browser/ui/browser.h" |
| 33 #include "chrome/browser/ui/browser_finder.h" | 33 #include "chrome/browser/ui/browser_finder.h" |
| 34 #include "chrome/browser/ui/browser_window.h" | 34 #include "chrome/browser/ui/browser_window.h" |
| 35 #include "chrome/grit/generated_resources.h" | 35 #include "chrome/grit/generated_resources.h" |
| 36 #include "chromeos/chromeos_switches.h" | 36 #include "chromeos/chromeos_switches.h" |
| 37 #include "content/public/browser/notification_service.h" | 37 #include "content/public/browser/notification_service.h" |
| 38 #include "content/public/browser/user_metrics.h" | 38 #include "content/public/browser/user_metrics.h" |
| 39 #include "ui/aura/window.h" | 39 #include "ui/aura/window.h" |
| 40 #include "ui/base/ime/chromeos/input_method_manager.h" | 40 #include "ui/base/ime/chromeos/input_method_manager.h" |
| 41 #include "ui/base/l10n/l10n_util.h" | 41 #include "ui/base/l10n/l10n_util.h" |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 GetSavedScreenMagnifierScale(); | 164 GetSavedScreenMagnifierScale(); |
| 165 } | 165 } |
| 166 return std::numeric_limits<double>::min(); | 166 return std::numeric_limits<double>::min(); |
| 167 } | 167 } |
| 168 | 168 |
| 169 void TriggerAccessibilityAlert(ui::AccessibilityAlert alert) override { | 169 void TriggerAccessibilityAlert(ui::AccessibilityAlert alert) override { |
| 170 Profile* profile = ProfileManager::GetActiveUserProfile(); | 170 Profile* profile = ProfileManager::GetActiveUserProfile(); |
| 171 if (profile) { | 171 if (profile) { |
| 172 switch (alert) { | 172 switch (alert) { |
| 173 case ui::A11Y_ALERT_WINDOW_NEEDED: { | 173 case ui::A11Y_ALERT_WINDOW_NEEDED: { |
| 174 AutomationManagerAura::GetInstance()->HandleAlert( | 174 AutomationManagerAsh::GetInstance()->HandleAlert( |
| 175 profile, l10n_util::GetStringUTF8(IDS_A11Y_ALERT_WINDOW_NEEDED)); | 175 profile, l10n_util::GetStringUTF8(IDS_A11Y_ALERT_WINDOW_NEEDED)); |
| 176 break; | 176 break; |
| 177 } | 177 } |
| 178 case ui::A11Y_ALERT_WINDOW_OVERVIEW_MODE_ENTERED: { | 178 case ui::A11Y_ALERT_WINDOW_OVERVIEW_MODE_ENTERED: { |
| 179 AutomationManagerAura::GetInstance()->HandleAlert( | 179 AutomationManagerAsh::GetInstance()->HandleAlert( |
| 180 profile, l10n_util::GetStringUTF8( | 180 profile, l10n_util::GetStringUTF8( |
| 181 IDS_A11Y_ALERT_WINDOW_OVERVIEW_MODE_ENTERED)); | 181 IDS_A11Y_ALERT_WINDOW_OVERVIEW_MODE_ENTERED)); |
| 182 break; | 182 break; |
| 183 } | 183 } |
| 184 case ui::A11Y_ALERT_NONE: | 184 case ui::A11Y_ALERT_NONE: |
| 185 break; | 185 break; |
| 186 } | 186 } |
| 187 } | 187 } |
| 188 } | 188 } |
| 189 | 189 |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 } | 272 } |
| 273 | 273 |
| 274 void ChromeShellDelegate::PlatformInit() { | 274 void ChromeShellDelegate::PlatformInit() { |
| 275 registrar_.Add(this, | 275 registrar_.Add(this, |
| 276 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, | 276 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, |
| 277 content::NotificationService::AllSources()); | 277 content::NotificationService::AllSources()); |
| 278 registrar_.Add(this, | 278 registrar_.Add(this, |
| 279 chrome::NOTIFICATION_SESSION_STARTED, | 279 chrome::NOTIFICATION_SESSION_STARTED, |
| 280 content::NotificationService::AllSources()); | 280 content::NotificationService::AllSources()); |
| 281 } | 281 } |
| OLD | NEW |