gpu: Crash GPU process when context was lost through robustness
[chromium-blink-merge.git] / ash / default_accessibility_delegate.cc
blobf337a2eb39a3cc51ddd641446acbf76ca32c8bd0
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
3 // found in the LICENSE file.
5 #include "ash/default_accessibility_delegate.h"
7 #include <limits>
9 namespace ash {
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) {
22 DefaultAccessibilityDelegate::~DefaultAccessibilityDelegate() {}
24 bool DefaultAccessibilityDelegate::IsSpokenFeedbackEnabled() const {
25 return spoken_feedback_enabled_;
28 void DefaultAccessibilityDelegate::ToggleHighContrast() {
29 high_contrast_enabled_ = !high_contrast_enabled_;
32 bool DefaultAccessibilityDelegate::IsHighContrastEnabled() const {
33 return high_contrast_enabled_;
36 void DefaultAccessibilityDelegate::SetMagnifierEnabled(bool enabled) {
37 screen_magnifier_enabled_ = enabled;
40 void DefaultAccessibilityDelegate::SetMagnifierType(ui::MagnifierType type) {
41 screen_magnifier_type_ = type;
44 bool DefaultAccessibilityDelegate::IsMagnifierEnabled() const {
45 return screen_magnifier_enabled_;
48 ui::MagnifierType DefaultAccessibilityDelegate::GetMagnifierType() const {
49 return screen_magnifier_type_;
52 void DefaultAccessibilityDelegate::SetLargeCursorEnabled(bool enabled) {
53 large_cursor_enabled_ = enabled;
56 bool DefaultAccessibilityDelegate::IsLargeCursorEnabled() const {
57 return large_cursor_enabled_;
60 void DefaultAccessibilityDelegate::SetAutoclickEnabled(bool enabled) {
61 autoclick_enabled_ = enabled;
64 bool DefaultAccessibilityDelegate::IsAutoclickEnabled() const {
65 return autoclick_enabled_;
68 void DefaultAccessibilityDelegate::SetVirtualKeyboardEnabled(bool enabled) {
69 virtual_keyboard_enabled_ = enabled;
72 bool DefaultAccessibilityDelegate::IsVirtualKeyboardEnabled() const {
73 return virtual_keyboard_enabled_;
76 bool DefaultAccessibilityDelegate::ShouldShowAccessibilityMenu() const {
77 return spoken_feedback_enabled_ ||
78 high_contrast_enabled_ ||
79 screen_magnifier_enabled_ ||
80 large_cursor_enabled_ ||
81 autoclick_enabled_ ||
82 virtual_keyboard_enabled_;
85 bool DefaultAccessibilityDelegate::IsBrailleDisplayConnected() const {
86 return false;
89 void DefaultAccessibilityDelegate::SilenceSpokenFeedback() const {
92 void DefaultAccessibilityDelegate::ToggleSpokenFeedback(
93 ui::AccessibilityNotificationVisibility notify) {
94 spoken_feedback_enabled_ = !spoken_feedback_enabled_;
97 void DefaultAccessibilityDelegate::SaveScreenMagnifierScale(double scale) {
100 double DefaultAccessibilityDelegate::GetSavedScreenMagnifierScale() {
101 return std::numeric_limits<double>::min();
104 void DefaultAccessibilityDelegate::TriggerAccessibilityAlert(
105 ui::AccessibilityAlert alert) {
106 accessibility_alert_ = alert;
109 ui::AccessibilityAlert
110 DefaultAccessibilityDelegate::GetLastAccessibilityAlert() {
111 return accessibility_alert_;
114 void DefaultAccessibilityDelegate::PlayEarcon(int sound_key) {
117 base::TimeDelta DefaultAccessibilityDelegate::PlayShutdownSound() const {
118 return base::TimeDelta();
121 } // namespace ash