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" | 10 #include "ash/magnifier/magnifier_constants.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h" | 32 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h" |
33 #include "chrome/browser/ui/startup/startup_browser_creator_impl.h" | 33 #include "chrome/browser/ui/startup/startup_browser_creator_impl.h" |
34 #include "chrome/common/chrome_switches.h" | 34 #include "chrome/common/chrome_switches.h" |
35 #include "content/public/browser/notification_service.h" | 35 #include "content/public/browser/notification_service.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 virtual ~NewWindowDelegateImpl() {} | 42 ~NewWindowDelegateImpl() override {} |
43 | 43 |
44 // Overridden from ash::NewWindowDelegate: | 44 // Overridden from ash::NewWindowDelegate: |
45 virtual void OpenFileManager() override {} | 45 void OpenFileManager() override {} |
46 virtual void OpenCrosh() override {} | 46 void OpenCrosh() override {} |
47 virtual void ShowKeyboardOverlay() override {} | 47 void ShowKeyboardOverlay() override {} |
48 | 48 |
49 private: | 49 private: |
50 DISALLOW_COPY_AND_ASSIGN(NewWindowDelegateImpl); | 50 DISALLOW_COPY_AND_ASSIGN(NewWindowDelegateImpl); |
51 }; | 51 }; |
52 | 52 |
53 class MediaDelegateImpl : public ash::MediaDelegate { | 53 class MediaDelegateImpl : public ash::MediaDelegate { |
54 public: | 54 public: |
55 MediaDelegateImpl() {} | 55 MediaDelegateImpl() {} |
56 virtual ~MediaDelegateImpl() {} | 56 ~MediaDelegateImpl() override {} |
57 virtual void HandleMediaNextTrack() override {} | 57 void HandleMediaNextTrack() override {} |
58 virtual void HandleMediaPlayPause() override {} | 58 void HandleMediaPlayPause() override {} |
59 virtual void HandleMediaPrevTrack() override {} | 59 void HandleMediaPrevTrack() override {} |
60 virtual ash::MediaCaptureState GetMediaCaptureState( | 60 ash::MediaCaptureState GetMediaCaptureState( |
61 content::BrowserContext* context) override { | 61 content::BrowserContext* context) override { |
62 return ash::MEDIA_CAPTURE_NONE; | 62 return ash::MEDIA_CAPTURE_NONE; |
63 } | 63 } |
64 | 64 |
65 private: | 65 private: |
66 DISALLOW_COPY_AND_ASSIGN(MediaDelegateImpl); | 66 DISALLOW_COPY_AND_ASSIGN(MediaDelegateImpl); |
67 }; | 67 }; |
68 | 68 |
69 class EmptyAccessibilityDelegate : public ash::AccessibilityDelegate { | 69 class EmptyAccessibilityDelegate : public ash::AccessibilityDelegate { |
70 public: | 70 public: |
71 EmptyAccessibilityDelegate() {} | 71 EmptyAccessibilityDelegate() {} |
72 virtual ~EmptyAccessibilityDelegate() {} | 72 ~EmptyAccessibilityDelegate() override {} |
73 | 73 |
74 virtual void ToggleHighContrast() override { | 74 void ToggleHighContrast() override {} |
75 } | |
76 | 75 |
77 virtual bool IsHighContrastEnabled() const override { | 76 bool IsHighContrastEnabled() const override { return false; } |
78 return false; | |
79 } | |
80 | 77 |
81 virtual bool IsSpokenFeedbackEnabled() const override { | 78 bool IsSpokenFeedbackEnabled() const override { return false; } |
82 return false; | |
83 } | |
84 | 79 |
85 virtual void ToggleSpokenFeedback( | 80 void ToggleSpokenFeedback( |
86 ash::AccessibilityNotificationVisibility notify) override { | 81 ash::AccessibilityNotificationVisibility notify) override {} |
87 } | |
88 | 82 |
89 virtual void SetLargeCursorEnabled(bool enalbed) override { | 83 void SetLargeCursorEnabled(bool enalbed) override {} |
90 } | |
91 | 84 |
92 virtual bool IsLargeCursorEnabled() const override { | 85 bool IsLargeCursorEnabled() const override { return false; } |
93 return false; | |
94 } | |
95 | 86 |
96 virtual void SetMagnifierEnabled(bool enabled) override { | 87 void SetMagnifierEnabled(bool enabled) override {} |
97 } | |
98 | 88 |
99 virtual void SetMagnifierType(ash::MagnifierType type) override { | 89 void SetMagnifierType(ash::MagnifierType type) override {} |
100 } | |
101 | 90 |
102 virtual bool IsMagnifierEnabled() const override { | 91 bool IsMagnifierEnabled() const override { return false; } |
103 return false; | |
104 } | |
105 | 92 |
106 virtual void SetAutoclickEnabled(bool enabled) override { | 93 void SetAutoclickEnabled(bool enabled) override {} |
107 } | |
108 | 94 |
109 virtual bool IsAutoclickEnabled() const override { | 95 bool IsAutoclickEnabled() const override { return false; } |
110 return false; | |
111 } | |
112 | 96 |
113 virtual ash::MagnifierType GetMagnifierType() const override { | 97 ash::MagnifierType GetMagnifierType() const override { |
114 return ash::kDefaultMagnifierType; | 98 return ash::kDefaultMagnifierType; |
115 } | 99 } |
116 | 100 |
117 virtual void SaveScreenMagnifierScale(double scale) override { | 101 void SaveScreenMagnifierScale(double scale) override {} |
118 } | |
119 | 102 |
120 virtual double GetSavedScreenMagnifierScale() override { | 103 double GetSavedScreenMagnifierScale() override { |
121 return std::numeric_limits<double>::min(); | 104 return std::numeric_limits<double>::min(); |
122 } | 105 } |
123 | 106 |
124 virtual bool ShouldShowAccessibilityMenu() const override { | 107 bool ShouldShowAccessibilityMenu() const override { return false; } |
125 return false; | |
126 } | |
127 | 108 |
128 virtual bool IsBrailleDisplayConnected() const override { return false; } | 109 bool IsBrailleDisplayConnected() const override { return false; } |
129 | 110 |
130 virtual void SilenceSpokenFeedback() const override { | 111 void SilenceSpokenFeedback() const override {} |
131 } | |
132 | 112 |
133 virtual void SetVirtualKeyboardEnabled(bool enabled) override { | 113 void SetVirtualKeyboardEnabled(bool enabled) override {} |
134 } | |
135 | 114 |
136 virtual bool IsVirtualKeyboardEnabled() const override { | 115 bool IsVirtualKeyboardEnabled() const override { return false; } |
137 return false; | |
138 } | |
139 | 116 |
140 virtual void TriggerAccessibilityAlert( | 117 void TriggerAccessibilityAlert(ash::AccessibilityAlert alert) override {} |
141 ash::AccessibilityAlert alert) override { | |
142 } | |
143 | 118 |
144 virtual ash::AccessibilityAlert GetLastAccessibilityAlert() override { | 119 ash::AccessibilityAlert GetLastAccessibilityAlert() override { |
145 return ash::A11Y_ALERT_NONE; | 120 return ash::A11Y_ALERT_NONE; |
146 } | 121 } |
147 | 122 |
148 virtual void PlayEarcon(int sound_key) override { | 123 void PlayEarcon(int sound_key) override {} |
149 } | |
150 | 124 |
151 virtual base::TimeDelta PlayShutdownSound() const override { | 125 base::TimeDelta PlayShutdownSound() const override { |
152 return base::TimeDelta(); | 126 return base::TimeDelta(); |
153 } | 127 } |
154 | 128 |
155 private: | 129 private: |
156 DISALLOW_COPY_AND_ASSIGN(EmptyAccessibilityDelegate); | 130 DISALLOW_COPY_AND_ASSIGN(EmptyAccessibilityDelegate); |
157 }; | 131 }; |
158 | 132 |
159 } // namespace | 133 } // namespace |
160 | 134 |
161 bool ChromeShellDelegate::IsFirstRunAfterBoot() const { | 135 bool ChromeShellDelegate::IsFirstRunAfterBoot() const { |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 chrome::NOTIFICATION_PROFILE_ADDED, | 244 chrome::NOTIFICATION_PROFILE_ADDED, |
271 content::NotificationService::AllSources()); | 245 content::NotificationService::AllSources()); |
272 registrar_.Add(this, | 246 registrar_.Add(this, |
273 chrome::NOTIFICATION_ASH_SESSION_STARTED, | 247 chrome::NOTIFICATION_ASH_SESSION_STARTED, |
274 content::NotificationService::AllSources()); | 248 content::NotificationService::AllSources()); |
275 registrar_.Add(this, | 249 registrar_.Add(this, |
276 chrome::NOTIFICATION_ASH_SESSION_ENDED, | 250 chrome::NOTIFICATION_ASH_SESSION_ENDED, |
277 content::NotificationService::AllSources()); | 251 content::NotificationService::AllSources()); |
278 #endif | 252 #endif |
279 } | 253 } |
OLD | NEW |