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

Side by Side Diff: ash/shell/shell_delegate_impl.cc

Issue 11415025: A11y: Introduce High Contrast Mode and Screen Magnifier to ubar tray. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 1 month 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/shell/shell_delegate_impl.h" 5 #include "ash/shell/shell_delegate_impl.h"
6 6
7 #include "ash/caps_lock_delegate_stub.h" 7 #include "ash/caps_lock_delegate_stub.h"
8 #include "ash/shell/example_factory.h" 8 #include "ash/shell/example_factory.h"
9 #include "ash/shell/launcher_delegate_impl.h" 9 #include "ash/shell/launcher_delegate_impl.h"
10 #include "ash/shell/context_menu.h" 10 #include "ash/shell/context_menu.h"
11 #include "ash/shell/toplevel_window.h" 11 #include "ash/shell/toplevel_window.h"
12 #include "ash/shell_window_ids.h" 12 #include "ash/shell_window_ids.h"
13 #include "ash/wm/window_util.h" 13 #include "ash/wm/window_util.h"
14 #include "base/message_loop.h" 14 #include "base/message_loop.h"
15 #include "ui/aura/window.h" 15 #include "ui/aura/window.h"
16 16
17 namespace ash { 17 namespace ash {
18 namespace shell { 18 namespace shell {
19 19
20 ShellDelegateImpl::ShellDelegateImpl() 20 ShellDelegateImpl::ShellDelegateImpl()
21 : watcher_(NULL), 21 : watcher_(NULL),
22 launcher_delegate_(NULL), 22 launcher_delegate_(NULL),
23 locked_(false), 23 locked_(false),
24 spoken_feedback_enabled_(false) { 24 spoken_feedback_enabled_(false),
25 high_contrast_enabled_(false),
26 screen_magnifier_type_(MAGNIFIER_OFF) {
25 } 27 }
26 28
27 ShellDelegateImpl::~ShellDelegateImpl() { 29 ShellDelegateImpl::~ShellDelegateImpl() {
28 } 30 }
29 31
30 void ShellDelegateImpl::SetWatcher(WindowWatcher* watcher) { 32 void ShellDelegateImpl::SetWatcher(WindowWatcher* watcher) {
31 watcher_ = watcher; 33 watcher_ = watcher;
32 if (launcher_delegate_) 34 if (launcher_delegate_)
33 launcher_delegate_->set_watcher(watcher); 35 launcher_delegate_->set_watcher(watcher);
34 } 36 }
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 } 112 }
111 113
112 void ShellDelegateImpl::ToggleSpokenFeedback() { 114 void ShellDelegateImpl::ToggleSpokenFeedback() {
113 spoken_feedback_enabled_ = !spoken_feedback_enabled_; 115 spoken_feedback_enabled_ = !spoken_feedback_enabled_;
114 } 116 }
115 117
116 bool ShellDelegateImpl::IsSpokenFeedbackEnabled() const { 118 bool ShellDelegateImpl::IsSpokenFeedbackEnabled() const {
117 return spoken_feedback_enabled_; 119 return spoken_feedback_enabled_;
118 } 120 }
119 121
122 void ShellDelegateImpl::ToggleHighContrast() {
123 high_contrast_enabled_ = !high_contrast_enabled_;
124 }
125
126 bool ShellDelegateImpl::IsHighContrastEnabled() const {
127 return high_contrast_enabled_;
128 }
129
130 void ShellDelegateImpl::SetScreenMagnifier(ScreenMagnifierType type) {
131 screen_magnifier_type_ = type;
132 }
133
134 bool ShellDelegateImpl::GetScreenMagnifierType() const {
135 return screen_magnifier_type_;
136 }
137
138 bool ShellDelegateImpl::AlwaysShowAccessibilityMenu() const {
139 return false;
140 }
141
120 app_list::AppListViewDelegate* ShellDelegateImpl::CreateAppListViewDelegate() { 142 app_list::AppListViewDelegate* ShellDelegateImpl::CreateAppListViewDelegate() {
121 return ash::shell::CreateAppListViewDelegate(); 143 return ash::shell::CreateAppListViewDelegate();
122 } 144 }
123 145
124 ash::LauncherDelegate* ShellDelegateImpl::CreateLauncherDelegate( 146 ash::LauncherDelegate* ShellDelegateImpl::CreateLauncherDelegate(
125 ash::LauncherModel* model) { 147 ash::LauncherModel* model) {
126 launcher_delegate_ = new LauncherDelegateImpl(watcher_); 148 launcher_delegate_ = new LauncherDelegateImpl(watcher_);
127 return launcher_delegate_; 149 return launcher_delegate_;
128 } 150 }
129 151
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 ui::MenuModel* ShellDelegateImpl::CreateContextMenu(aura::RootWindow* root) { 194 ui::MenuModel* ShellDelegateImpl::CreateContextMenu(aura::RootWindow* root) {
173 return new ContextMenu(root); 195 return new ContextMenu(root);
174 } 196 }
175 197
176 aura::client::StackingClient* ShellDelegateImpl::CreateStackingClient() { 198 aura::client::StackingClient* ShellDelegateImpl::CreateStackingClient() {
177 return NULL; 199 return NULL;
178 } 200 }
179 201
180 } // namespace shell 202 } // namespace shell
181 } // namespace ash 203 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698