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

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: review fix (comment #10) Created 8 years 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/stacking_controller.h" 13 #include "ash/wm/stacking_controller.h"
14 #include "ash/wm/window_util.h" 14 #include "ash/wm/window_util.h"
15 #include "base/message_loop.h" 15 #include "base/message_loop.h"
16 #include "ui/aura/window.h" 16 #include "ui/aura/window.h"
17 17
18 namespace ash { 18 namespace ash {
19 namespace shell { 19 namespace shell {
20 20
21 ShellDelegateImpl::ShellDelegateImpl() 21 ShellDelegateImpl::ShellDelegateImpl()
22 : watcher_(NULL), 22 : watcher_(NULL),
23 launcher_delegate_(NULL), 23 launcher_delegate_(NULL),
24 locked_(false), 24 locked_(false),
25 spoken_feedback_enabled_(false) { 25 spoken_feedback_enabled_(false),
26 high_contrast_enabled_(false),
27 screen_magnifier_type_(MAGNIFIER_OFF) {
26 } 28 }
27 29
28 ShellDelegateImpl::~ShellDelegateImpl() { 30 ShellDelegateImpl::~ShellDelegateImpl() {
29 } 31 }
30 32
31 void ShellDelegateImpl::SetWatcher(WindowWatcher* watcher) { 33 void ShellDelegateImpl::SetWatcher(WindowWatcher* watcher) {
32 watcher_ = watcher; 34 watcher_ = watcher;
33 if (launcher_delegate_) 35 if (launcher_delegate_)
34 launcher_delegate_->set_watcher(watcher); 36 launcher_delegate_->set_watcher(watcher);
35 } 37 }
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 } 117 }
116 118
117 void ShellDelegateImpl::ToggleSpokenFeedback() { 119 void ShellDelegateImpl::ToggleSpokenFeedback() {
118 spoken_feedback_enabled_ = !spoken_feedback_enabled_; 120 spoken_feedback_enabled_ = !spoken_feedback_enabled_;
119 } 121 }
120 122
121 bool ShellDelegateImpl::IsSpokenFeedbackEnabled() const { 123 bool ShellDelegateImpl::IsSpokenFeedbackEnabled() const {
122 return spoken_feedback_enabled_; 124 return spoken_feedback_enabled_;
123 } 125 }
124 126
127 void ShellDelegateImpl::ToggleHighContrast() {
128 high_contrast_enabled_ = !high_contrast_enabled_;
129 }
130
131 bool ShellDelegateImpl::IsHighContrastEnabled() const {
132 return high_contrast_enabled_;
133 }
134
135 void ShellDelegateImpl::SetScreenMagnifier(MagnifierType type) {
136 screen_magnifier_type_ = type;
137 }
138
139 bool ShellDelegateImpl::GetMagnifierType() const {
140 return screen_magnifier_type_;
141 }
142
143 bool ShellDelegateImpl::ShouldAlwaysShowAccessibilityMenu() const {
144 return false;
145 }
146
125 app_list::AppListViewDelegate* ShellDelegateImpl::CreateAppListViewDelegate() { 147 app_list::AppListViewDelegate* ShellDelegateImpl::CreateAppListViewDelegate() {
126 return ash::shell::CreateAppListViewDelegate(); 148 return ash::shell::CreateAppListViewDelegate();
127 } 149 }
128 150
129 ash::LauncherDelegate* ShellDelegateImpl::CreateLauncherDelegate( 151 ash::LauncherDelegate* ShellDelegateImpl::CreateLauncherDelegate(
130 ash::LauncherModel* model) { 152 ash::LauncherModel* model) {
131 launcher_delegate_ = new LauncherDelegateImpl(watcher_); 153 launcher_delegate_ = new LauncherDelegateImpl(watcher_);
132 return launcher_delegate_; 154 return launcher_delegate_;
133 } 155 }
134 156
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 ui::MenuModel* ShellDelegateImpl::CreateContextMenu(aura::RootWindow* root) { 199 ui::MenuModel* ShellDelegateImpl::CreateContextMenu(aura::RootWindow* root) {
178 return new ContextMenu(root); 200 return new ContextMenu(root);
179 } 201 }
180 202
181 aura::client::StackingClient* ShellDelegateImpl::CreateStackingClient() { 203 aura::client::StackingClient* ShellDelegateImpl::CreateStackingClient() {
182 return new StackingController; 204 return new StackingController;
183 } 205 }
184 206
185 } // namespace shell 207 } // namespace shell
186 } // namespace ash 208 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell/shell_delegate_impl.h ('k') | ash/shell_delegate.h » ('j') | ash/shell_delegate.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698