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

Side by Side Diff: ash/test/test_shell_delegate.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/test/test_shell_delegate.h" 5 #include "ash/test/test_shell_delegate.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/caps_lock_delegate_stub.h" 9 #include "ash/caps_lock_delegate_stub.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
11 #include "ash/shell_window_ids.h" 11 #include "ash/shell_window_ids.h"
12 #include "ash/test/test_launcher_delegate.h" 12 #include "ash/test/test_launcher_delegate.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 "content/public/test/test_browser_context.h" 15 #include "content/public/test/test_browser_context.h"
16 #include "ui/aura/window.h" 16 #include "ui/aura/window.h"
17 17
18 namespace ash { 18 namespace ash {
19 namespace test { 19 namespace test {
20 20
21 TestShellDelegate::TestShellDelegate() 21 TestShellDelegate::TestShellDelegate()
22 : locked_(false), 22 : locked_(false),
23 session_started_(true), 23 session_started_(true),
24 spoken_feedback_enabled_(false), 24 spoken_feedback_enabled_(false),
25 high_contrast_enabled_(false),
26 screen_magnifier_type_(MAGNIFIER_OFF),
25 user_logged_in_(true), 27 user_logged_in_(true),
26 num_exit_requests_(0) { 28 num_exit_requests_(0) {
27 } 29 }
28 30
29 TestShellDelegate::~TestShellDelegate() { 31 TestShellDelegate::~TestShellDelegate() {
30 } 32 }
31 33
32 bool TestShellDelegate::IsUserLoggedIn() { 34 bool TestShellDelegate::IsUserLoggedIn() {
33 return user_logged_in_; 35 return user_logged_in_;
34 } 36 }
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 } 102 }
101 103
102 void TestShellDelegate::ToggleSpokenFeedback() { 104 void TestShellDelegate::ToggleSpokenFeedback() {
103 spoken_feedback_enabled_ = !spoken_feedback_enabled_; 105 spoken_feedback_enabled_ = !spoken_feedback_enabled_;
104 } 106 }
105 107
106 bool TestShellDelegate::IsSpokenFeedbackEnabled() const { 108 bool TestShellDelegate::IsSpokenFeedbackEnabled() const {
107 return spoken_feedback_enabled_; 109 return spoken_feedback_enabled_;
108 } 110 }
109 111
112 void TestShellDelegate::ToggleHighContrast() {
113 high_contrast_enabled_ = !high_contrast_enabled_;
114 }
115
116 bool TestShellDelegate::IsHighContrastEnabled() const {
117 return high_contrast_enabled_;
118 }
119
120 void TestShellDelegate::SetScreenMagnifier(const ScreenMagnifierType type) {
121 screen_magnifier_type_ = type;
122 }
123
124 ScreenMagnifierType TestShellDelegate::GetScreenMagnifierType() const {
125 return screen_magnifier_type_;
126 }
127
128 bool TestShellDelegate::AlwaysShowAccessibilityMenu() const {
129 return false;
130 }
131
110 app_list::AppListViewDelegate* TestShellDelegate::CreateAppListViewDelegate() { 132 app_list::AppListViewDelegate* TestShellDelegate::CreateAppListViewDelegate() {
111 return NULL; 133 return NULL;
112 } 134 }
113 135
114 LauncherDelegate* TestShellDelegate::CreateLauncherDelegate( 136 LauncherDelegate* TestShellDelegate::CreateLauncherDelegate(
115 ash::LauncherModel* model) { 137 ash::LauncherModel* model) {
116 return new TestLauncherDelegate(model); 138 return new TestLauncherDelegate(model);
117 } 139 }
118 140
119 SystemTrayDelegate* TestShellDelegate::CreateSystemTrayDelegate() { 141 SystemTrayDelegate* TestShellDelegate::CreateSystemTrayDelegate() {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 } 195 }
174 196
175 void TestShellDelegate::SetUserLoggedIn(bool user_logged_in) { 197 void TestShellDelegate::SetUserLoggedIn(bool user_logged_in) {
176 user_logged_in_ = user_logged_in; 198 user_logged_in_ = user_logged_in;
177 if (!user_logged_in) 199 if (!user_logged_in)
178 session_started_ = false; 200 session_started_ = false;
179 } 201 }
180 202
181 } // namespace test 203 } // namespace test
182 } // namespace ash 204 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698