Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(125)

Side by Side Diff: chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc

Issue 1785833002: Add 5 experimental accessibility features on Chrome OS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change option_name to option-name Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 DCHECK(chromeos::AccessibilityManager::Get()); 140 DCHECK(chromeos::AccessibilityManager::Get());
141 return chromeos::AccessibilityManager::Get()-> 141 return chromeos::AccessibilityManager::Get()->
142 EnableVirtualKeyboard(enabled); 142 EnableVirtualKeyboard(enabled);
143 } 143 }
144 144
145 bool IsVirtualKeyboardEnabled() const override { 145 bool IsVirtualKeyboardEnabled() const override {
146 DCHECK(chromeos::AccessibilityManager::Get()); 146 DCHECK(chromeos::AccessibilityManager::Get());
147 return chromeos::AccessibilityManager::Get()->IsVirtualKeyboardEnabled(); 147 return chromeos::AccessibilityManager::Get()->IsVirtualKeyboardEnabled();
148 } 148 }
149 149
150 void SetCaretHighlightEnabled(bool enabled) override {
151 DCHECK(chromeos::AccessibilityManager::Get());
152 chromeos::AccessibilityManager::Get()->SetCaretHighlightEnabled(enabled);
153 }
154
155 bool IsCaretHighlightEnabled() const override {
156 DCHECK(chromeos::AccessibilityManager::Get());
157 return chromeos::AccessibilityManager::Get()->IsCaretHighlightEnabled();
158 }
159
160 void SetCursorHighlightEnabled(bool enabled) override {
161 DCHECK(chromeos::AccessibilityManager::Get());
162 chromeos::AccessibilityManager::Get()->SetCursorHighlightEnabled(enabled);
163 }
164
165 bool IsCursorHighlightEnabled() const override {
166 DCHECK(chromeos::AccessibilityManager::Get());
167 return chromeos::AccessibilityManager::Get()->IsCursorHighlightEnabled();
168 }
169
170 void SetFocusHighlightEnabled(bool enabled) override {
171 DCHECK(chromeos::AccessibilityManager::Get());
172 chromeos::AccessibilityManager::Get()->SetFocusHighlightEnabled(enabled);
173 }
174
175 bool IsFocusHighlightEnabled() const override {
176 DCHECK(chromeos::AccessibilityManager::Get());
177 return chromeos::AccessibilityManager::Get()->IsFocusHighlightEnabled();
178 }
179
180 void SetSelectToSpeakEnabled(bool enabled) override {
181 DCHECK(chromeos::AccessibilityManager::Get());
182 chromeos::AccessibilityManager::Get()->SetSelectToSpeakEnabled(enabled);
183 }
184
185 bool IsSelectToSpeakEnabled() const override {
186 DCHECK(chromeos::AccessibilityManager::Get());
187 return chromeos::AccessibilityManager::Get()->IsSelectToSpeakEnabled();
188 }
189
190 void SetSwitchAccessEnabled(bool enabled) override {
191 DCHECK(chromeos::AccessibilityManager::Get());
192 chromeos::AccessibilityManager::Get()->SetSwitchAccessEnabled(enabled);
193 }
194
195 bool IsSwitchAccessEnabled() const override {
196 DCHECK(chromeos::AccessibilityManager::Get());
197 return chromeos::AccessibilityManager::Get()->IsSwitchAccessEnabled();
198 }
199
150 bool ShouldShowAccessibilityMenu() const override { 200 bool ShouldShowAccessibilityMenu() const override {
151 DCHECK(chromeos::AccessibilityManager::Get()); 201 DCHECK(chromeos::AccessibilityManager::Get());
152 return chromeos::AccessibilityManager::Get()-> 202 return chromeos::AccessibilityManager::Get()->
153 ShouldShowAccessibilityMenu(); 203 ShouldShowAccessibilityMenu();
154 } 204 }
155 205
156 bool IsBrailleDisplayConnected() const override { 206 bool IsBrailleDisplayConnected() const override {
157 DCHECK(chromeos::AccessibilityManager::Get()); 207 DCHECK(chromeos::AccessibilityManager::Get());
158 return chromeos::AccessibilityManager::Get()->IsBrailleDisplayConnected(); 208 return chromeos::AccessibilityManager::Get()->IsBrailleDisplayConnected();
159 } 209 }
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 } 345 }
296 346
297 void ChromeShellDelegate::PlatformInit() { 347 void ChromeShellDelegate::PlatformInit() {
298 registrar_.Add(this, 348 registrar_.Add(this,
299 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, 349 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED,
300 content::NotificationService::AllSources()); 350 content::NotificationService::AllSources());
301 registrar_.Add(this, 351 registrar_.Add(this,
302 chrome::NOTIFICATION_SESSION_STARTED, 352 chrome::NOTIFICATION_SESSION_STARTED,
303 content::NotificationService::AllSources()); 353 content::NotificationService::AllSources());
304 } 354 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/browser_options.js ('k') | chrome/browser/ui/ash/chrome_shell_delegate_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698