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

Side by Side Diff: ash/default_accessibility_delegate.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
« no previous file with comments | « ash/default_accessibility_delegate.h ('k') | chrome/app/chromeos_strings.grdp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ash/default_accessibility_delegate.h" 5 #include "ash/default_accessibility_delegate.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 namespace ash { 9 namespace ash {
10 10
11 DefaultAccessibilityDelegate::DefaultAccessibilityDelegate() 11 DefaultAccessibilityDelegate::DefaultAccessibilityDelegate() {}
12 : spoken_feedback_enabled_(false),
13 high_contrast_enabled_(false),
14 screen_magnifier_enabled_(false),
15 screen_magnifier_type_(ui::kDefaultMagnifierType),
16 large_cursor_enabled_(false),
17 autoclick_enabled_(false),
18 virtual_keyboard_enabled_(false),
19 accessibility_alert_(ui::A11Y_ALERT_NONE) {
20 }
21 12
22 DefaultAccessibilityDelegate::~DefaultAccessibilityDelegate() {} 13 DefaultAccessibilityDelegate::~DefaultAccessibilityDelegate() {}
23 14
24 bool DefaultAccessibilityDelegate::IsSpokenFeedbackEnabled() const { 15 bool DefaultAccessibilityDelegate::IsSpokenFeedbackEnabled() const {
25 return spoken_feedback_enabled_; 16 return spoken_feedback_enabled_;
26 } 17 }
27 18
28 void DefaultAccessibilityDelegate::ToggleHighContrast() { 19 void DefaultAccessibilityDelegate::ToggleHighContrast() {
29 high_contrast_enabled_ = !high_contrast_enabled_; 20 high_contrast_enabled_ = !high_contrast_enabled_;
30 } 21 }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 } 57 }
67 58
68 void DefaultAccessibilityDelegate::SetVirtualKeyboardEnabled(bool enabled) { 59 void DefaultAccessibilityDelegate::SetVirtualKeyboardEnabled(bool enabled) {
69 virtual_keyboard_enabled_ = enabled; 60 virtual_keyboard_enabled_ = enabled;
70 } 61 }
71 62
72 bool DefaultAccessibilityDelegate::IsVirtualKeyboardEnabled() const { 63 bool DefaultAccessibilityDelegate::IsVirtualKeyboardEnabled() const {
73 return virtual_keyboard_enabled_; 64 return virtual_keyboard_enabled_;
74 } 65 }
75 66
67 void DefaultAccessibilityDelegate::SetCaretHighlightEnabled(bool enabled) {
68 caret_highlight_enabled_ = enabled;
69 }
70
71 bool DefaultAccessibilityDelegate::IsCaretHighlightEnabled() const {
72 return caret_highlight_enabled_;
73 }
74
75 void DefaultAccessibilityDelegate::SetCursorHighlightEnabled(bool enabled) {
76 cursor_highlight_enabled_ = enabled;
77 }
78
79 bool DefaultAccessibilityDelegate::IsCursorHighlightEnabled() const {
80 return cursor_highlight_enabled_;
81 }
82
83 void DefaultAccessibilityDelegate::SetFocusHighlightEnabled(bool enabled) {
84 focus_highligh_enabled_ = enabled;
85 }
86
87 bool DefaultAccessibilityDelegate::IsFocusHighlightEnabled() const {
88 return focus_highligh_enabled_;
89 }
90
91 void DefaultAccessibilityDelegate::SetSelectToSpeakEnabled(bool enabled) {
92 select_to_speak_enabled_ = enabled;
93 }
94
95 bool DefaultAccessibilityDelegate::IsSelectToSpeakEnabled() const {
96 return select_to_speak_enabled_;
97 }
98
99 void DefaultAccessibilityDelegate::SetSwitchAccessEnabled(bool enabled) {
100 switch_access_enabled_ = enabled;
101 }
102
103 bool DefaultAccessibilityDelegate::IsSwitchAccessEnabled() const {
104 return switch_access_enabled_;
105 }
106
76 bool DefaultAccessibilityDelegate::ShouldShowAccessibilityMenu() const { 107 bool DefaultAccessibilityDelegate::ShouldShowAccessibilityMenu() const {
77 return spoken_feedback_enabled_ || 108 return spoken_feedback_enabled_ ||
78 high_contrast_enabled_ || 109 high_contrast_enabled_ ||
79 screen_magnifier_enabled_ || 110 screen_magnifier_enabled_ ||
80 large_cursor_enabled_ || 111 large_cursor_enabled_ ||
81 autoclick_enabled_ || 112 autoclick_enabled_ ||
82 virtual_keyboard_enabled_; 113 virtual_keyboard_enabled_;
83 } 114 }
84 115
85 bool DefaultAccessibilityDelegate::IsBrailleDisplayConnected() const { 116 bool DefaultAccessibilityDelegate::IsBrailleDisplayConnected() const {
(...skipping 26 matching lines...) Expand all
112 } 143 }
113 144
114 void DefaultAccessibilityDelegate::PlayEarcon(int sound_key) { 145 void DefaultAccessibilityDelegate::PlayEarcon(int sound_key) {
115 } 146 }
116 147
117 base::TimeDelta DefaultAccessibilityDelegate::PlayShutdownSound() const { 148 base::TimeDelta DefaultAccessibilityDelegate::PlayShutdownSound() const {
118 return base::TimeDelta(); 149 return base::TimeDelta();
119 } 150 }
120 151
121 } // namespace ash 152 } // namespace ash
OLDNEW
« no previous file with comments | « ash/default_accessibility_delegate.h ('k') | chrome/app/chromeos_strings.grdp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698