| 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 <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "ash/accessibility_delegate.h" | 9 #include "ash/accessibility_delegate.h" |
| 10 #include "ash/magnifier/magnifier_constants.h" | |
| 11 #include "ash/media_delegate.h" | 10 #include "ash/media_delegate.h" |
| 12 #include "ash/wm/window_util.h" | 11 #include "ash/wm/window_util.h" |
| 13 #include "base/command_line.h" | 12 #include "base/command_line.h" |
| 14 #include "chrome/browser/accessibility/accessibility_events.h" | 13 #include "chrome/browser/accessibility/accessibility_events.h" |
| 15 #include "chrome/browser/browser_process.h" | 14 #include "chrome/browser/browser_process.h" |
| 16 #include "chrome/browser/chrome_notification_types.h" | 15 #include "chrome/browser/chrome_notification_types.h" |
| 17 #include "chrome/browser/prefs/session_startup_pref.h" | 16 #include "chrome/browser/prefs/session_startup_pref.h" |
| 18 #include "chrome/browser/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
| 19 #include "chrome/browser/profiles/profile_manager.h" | 18 #include "chrome/browser/profiles/profile_manager.h" |
| 20 #include "chrome/browser/signin/signin_error_notifier_factory_ash.h" | 19 #include "chrome/browser/signin/signin_error_notifier_factory_ash.h" |
| 21 #include "chrome/browser/sync/sync_error_notifier_factory_ash.h" | 20 #include "chrome/browser/sync/sync_error_notifier_factory_ash.h" |
| 22 #include "chrome/browser/ui/ash/chrome_new_window_delegate.h" | 21 #include "chrome/browser/ui/ash/chrome_new_window_delegate.h" |
| 23 #include "chrome/browser/ui/ash/session_state_delegate_views.h" | 22 #include "chrome/browser/ui/ash/session_state_delegate_views.h" |
| 24 #include "chrome/browser/ui/ash/solid_color_user_wallpaper_delegate.h" | 23 #include "chrome/browser/ui/ash/solid_color_user_wallpaper_delegate.h" |
| 25 #include "chrome/browser/ui/ash/system_tray_delegate_common.h" | 24 #include "chrome/browser/ui/ash/system_tray_delegate_common.h" |
| 26 #include "chrome/browser/ui/browser.h" | 25 #include "chrome/browser/ui/browser.h" |
| 27 #include "chrome/browser/ui/browser_finder.h" | 26 #include "chrome/browser/ui/browser_finder.h" |
| 28 #include "chrome/browser/ui/browser_list.h" | 27 #include "chrome/browser/ui/browser_list.h" |
| 29 #include "chrome/browser/ui/browser_tabstrip.h" | 28 #include "chrome/browser/ui/browser_tabstrip.h" |
| 30 #include "chrome/browser/ui/browser_window.h" | 29 #include "chrome/browser/ui/browser_window.h" |
| 31 #include "chrome/browser/ui/host_desktop.h" | 30 #include "chrome/browser/ui/host_desktop.h" |
| 32 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h" | 31 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h" |
| 33 #include "chrome/browser/ui/startup/startup_browser_creator_impl.h" | 32 #include "chrome/browser/ui/startup/startup_browser_creator_impl.h" |
| 34 #include "chrome/common/chrome_switches.h" | 33 #include "chrome/common/chrome_switches.h" |
| 35 #include "content/public/browser/notification_service.h" | 34 #include "content/public/browser/notification_service.h" |
| 35 #include "ui/chromeos/accessibility_types.h" |
| 36 | 36 |
| 37 namespace { | 37 namespace { |
| 38 | 38 |
| 39 class NewWindowDelegateImpl : public ChromeNewWindowDelegate { | 39 class NewWindowDelegateImpl : public ChromeNewWindowDelegate { |
| 40 public: | 40 public: |
| 41 NewWindowDelegateImpl() {} | 41 NewWindowDelegateImpl() {} |
| 42 ~NewWindowDelegateImpl() override {} | 42 ~NewWindowDelegateImpl() override {} |
| 43 | 43 |
| 44 // Overridden from ash::NewWindowDelegate: | 44 // Overridden from ash::NewWindowDelegate: |
| 45 void OpenFileManager() override {} | 45 void OpenFileManager() override {} |
| (...skipping 25 matching lines...) Expand all Loading... |
| 71 EmptyAccessibilityDelegate() {} | 71 EmptyAccessibilityDelegate() {} |
| 72 ~EmptyAccessibilityDelegate() override {} | 72 ~EmptyAccessibilityDelegate() override {} |
| 73 | 73 |
| 74 void ToggleHighContrast() override {} | 74 void ToggleHighContrast() override {} |
| 75 | 75 |
| 76 bool IsHighContrastEnabled() const override { return false; } | 76 bool IsHighContrastEnabled() const override { return false; } |
| 77 | 77 |
| 78 bool IsSpokenFeedbackEnabled() const override { return false; } | 78 bool IsSpokenFeedbackEnabled() const override { return false; } |
| 79 | 79 |
| 80 void ToggleSpokenFeedback( | 80 void ToggleSpokenFeedback( |
| 81 ash::AccessibilityNotificationVisibility notify) override {} | 81 ui::AccessibilityNotificationVisibility notify) override {} |
| 82 | 82 |
| 83 void SetLargeCursorEnabled(bool enalbed) override {} | 83 void SetLargeCursorEnabled(bool enalbed) override {} |
| 84 | 84 |
| 85 bool IsLargeCursorEnabled() const override { return false; } | 85 bool IsLargeCursorEnabled() const override { return false; } |
| 86 | 86 |
| 87 void SetMagnifierEnabled(bool enabled) override {} | 87 void SetMagnifierEnabled(bool enabled) override {} |
| 88 | 88 |
| 89 void SetMagnifierType(ash::MagnifierType type) override {} | 89 void SetMagnifierType(ui::MagnifierType type) override {} |
| 90 | 90 |
| 91 bool IsMagnifierEnabled() const override { return false; } | 91 bool IsMagnifierEnabled() const override { return false; } |
| 92 | 92 |
| 93 void SetAutoclickEnabled(bool enabled) override {} | 93 void SetAutoclickEnabled(bool enabled) override {} |
| 94 | 94 |
| 95 bool IsAutoclickEnabled() const override { return false; } | 95 bool IsAutoclickEnabled() const override { return false; } |
| 96 | 96 |
| 97 ash::MagnifierType GetMagnifierType() const override { | 97 ui::MagnifierType GetMagnifierType() const override { |
| 98 return ash::kDefaultMagnifierType; | 98 return ui::kDefaultMagnifierType; |
| 99 } | 99 } |
| 100 | 100 |
| 101 void SaveScreenMagnifierScale(double scale) override {} | 101 void SaveScreenMagnifierScale(double scale) override {} |
| 102 | 102 |
| 103 double GetSavedScreenMagnifierScale() override { | 103 double GetSavedScreenMagnifierScale() override { |
| 104 return std::numeric_limits<double>::min(); | 104 return std::numeric_limits<double>::min(); |
| 105 } | 105 } |
| 106 | 106 |
| 107 bool ShouldShowAccessibilityMenu() const override { return false; } | 107 bool ShouldShowAccessibilityMenu() const override { return false; } |
| 108 | 108 |
| 109 bool IsBrailleDisplayConnected() const override { return false; } | 109 bool IsBrailleDisplayConnected() const override { return false; } |
| 110 | 110 |
| 111 void SilenceSpokenFeedback() const override {} | 111 void SilenceSpokenFeedback() const override {} |
| 112 | 112 |
| 113 void SetVirtualKeyboardEnabled(bool enabled) override {} | 113 void SetVirtualKeyboardEnabled(bool enabled) override {} |
| 114 | 114 |
| 115 bool IsVirtualKeyboardEnabled() const override { return false; } | 115 bool IsVirtualKeyboardEnabled() const override { return false; } |
| 116 | 116 |
| 117 void TriggerAccessibilityAlert(ash::AccessibilityAlert alert) override {} | 117 void TriggerAccessibilityAlert(ui::AccessibilityAlert alert) override {} |
| 118 | 118 |
| 119 ash::AccessibilityAlert GetLastAccessibilityAlert() override { | 119 ui::AccessibilityAlert GetLastAccessibilityAlert() override { |
| 120 return ash::A11Y_ALERT_NONE; | 120 return ui::A11Y_ALERT_NONE; |
| 121 } | 121 } |
| 122 | 122 |
| 123 void PlayEarcon(int sound_key) override {} | 123 void PlayEarcon(int sound_key) override {} |
| 124 | 124 |
| 125 base::TimeDelta PlayShutdownSound() const override { | 125 base::TimeDelta PlayShutdownSound() const override { |
| 126 return base::TimeDelta(); | 126 return base::TimeDelta(); |
| 127 } | 127 } |
| 128 | 128 |
| 129 private: | 129 private: |
| 130 DISALLOW_COPY_AND_ASSIGN(EmptyAccessibilityDelegate); | 130 DISALLOW_COPY_AND_ASSIGN(EmptyAccessibilityDelegate); |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 chrome::NOTIFICATION_PROFILE_ADDED, | 244 chrome::NOTIFICATION_PROFILE_ADDED, |
| 245 content::NotificationService::AllSources()); | 245 content::NotificationService::AllSources()); |
| 246 registrar_.Add(this, | 246 registrar_.Add(this, |
| 247 chrome::NOTIFICATION_ASH_SESSION_STARTED, | 247 chrome::NOTIFICATION_ASH_SESSION_STARTED, |
| 248 content::NotificationService::AllSources()); | 248 content::NotificationService::AllSources()); |
| 249 registrar_.Add(this, | 249 registrar_.Add(this, |
| 250 chrome::NOTIFICATION_ASH_SESSION_ENDED, | 250 chrome::NOTIFICATION_ASH_SESSION_ENDED, |
| 251 content::NotificationService::AllSources()); | 251 content::NotificationService::AllSources()); |
| 252 #endif | 252 #endif |
| 253 } | 253 } |
| OLD | NEW |