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

Side by Side Diff: ash/default_accessibility_delegate.cc

Issue 137993021: Add a11y on-screen keyboard to accessibility menu on system tray. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address reviewer feedback. Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « ash/default_accessibility_delegate.h ('k') | ash/metrics/user_metrics_recorder.h » ('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 namespace internal { 10 namespace internal {
11 11
12 DefaultAccessibilityDelegate::DefaultAccessibilityDelegate() 12 DefaultAccessibilityDelegate::DefaultAccessibilityDelegate()
13 : spoken_feedback_enabled_(false), 13 : spoken_feedback_enabled_(false),
14 high_contrast_enabled_(false), 14 high_contrast_enabled_(false),
15 screen_magnifier_enabled_(false), 15 screen_magnifier_enabled_(false),
16 screen_magnifier_type_(kDefaultMagnifierType), 16 screen_magnifier_type_(kDefaultMagnifierType),
17 large_cursor_enabled_(false), 17 large_cursor_enabled_(false),
18 autoclick_enabled_(false), 18 autoclick_enabled_(false),
19 virtual_keyboard_enabled_(false),
19 accessibility_alert_(A11Y_ALERT_NONE) { 20 accessibility_alert_(A11Y_ALERT_NONE) {
20 } 21 }
21 22
22 DefaultAccessibilityDelegate::~DefaultAccessibilityDelegate() {} 23 DefaultAccessibilityDelegate::~DefaultAccessibilityDelegate() {}
23 24
24 bool DefaultAccessibilityDelegate::IsSpokenFeedbackEnabled() const { 25 bool DefaultAccessibilityDelegate::IsSpokenFeedbackEnabled() const {
25 return spoken_feedback_enabled_; 26 return spoken_feedback_enabled_;
26 } 27 }
27 28
28 void DefaultAccessibilityDelegate::ToggleHighContrast() { 29 void DefaultAccessibilityDelegate::ToggleHighContrast() {
(...skipping 29 matching lines...) Expand all
58 } 59 }
59 60
60 void DefaultAccessibilityDelegate::SetAutoclickEnabled(bool enabled) { 61 void DefaultAccessibilityDelegate::SetAutoclickEnabled(bool enabled) {
61 autoclick_enabled_ = enabled; 62 autoclick_enabled_ = enabled;
62 } 63 }
63 64
64 bool DefaultAccessibilityDelegate::IsAutoclickEnabled() const { 65 bool DefaultAccessibilityDelegate::IsAutoclickEnabled() const {
65 return autoclick_enabled_; 66 return autoclick_enabled_;
66 } 67 }
67 68
69 void DefaultAccessibilityDelegate::SetVirtualKeyboardEnabled(bool enabled) {
70 virtual_keyboard_enabled_ = enabled;
71 }
72
68 bool DefaultAccessibilityDelegate::IsVirtualKeyboardEnabled() const { 73 bool DefaultAccessibilityDelegate::IsVirtualKeyboardEnabled() const {
69 return false; 74 return virtual_keyboard_enabled_;
70 } 75 }
71 76
72 bool DefaultAccessibilityDelegate::ShouldShowAccessibilityMenu() const { 77 bool DefaultAccessibilityDelegate::ShouldShowAccessibilityMenu() const {
73 return spoken_feedback_enabled_ || 78 return spoken_feedback_enabled_ ||
74 high_contrast_enabled_ || 79 high_contrast_enabled_ ||
75 screen_magnifier_enabled_ || 80 screen_magnifier_enabled_ ||
76 large_cursor_enabled_ || 81 large_cursor_enabled_ ||
77 autoclick_enabled_; 82 autoclick_enabled_ ||
83 virtual_keyboard_enabled_;
78 } 84 }
79 85
80 void DefaultAccessibilityDelegate::SilenceSpokenFeedback() const { 86 void DefaultAccessibilityDelegate::SilenceSpokenFeedback() const {
81 } 87 }
82 88
83 void DefaultAccessibilityDelegate::ToggleSpokenFeedback( 89 void DefaultAccessibilityDelegate::ToggleSpokenFeedback(
84 AccessibilityNotificationVisibility notify) { 90 AccessibilityNotificationVisibility notify) {
85 spoken_feedback_enabled_ = !spoken_feedback_enabled_; 91 spoken_feedback_enabled_ = !spoken_feedback_enabled_;
86 } 92 }
87 93
(...skipping 12 matching lines...) Expand all
100 AccessibilityAlert DefaultAccessibilityDelegate::GetLastAccessibilityAlert() { 106 AccessibilityAlert DefaultAccessibilityDelegate::GetLastAccessibilityAlert() {
101 return accessibility_alert_; 107 return accessibility_alert_;
102 } 108 }
103 109
104 base::TimeDelta DefaultAccessibilityDelegate::PlayShutdownSound() const { 110 base::TimeDelta DefaultAccessibilityDelegate::PlayShutdownSound() const {
105 return base::TimeDelta(); 111 return base::TimeDelta();
106 } 112 }
107 113
108 } // namespace internal 114 } // namespace internal
109 } // namespace ash 115 } // namespace ash
OLDNEW
« no previous file with comments | « ash/default_accessibility_delegate.h ('k') | ash/metrics/user_metrics_recorder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698