OLD | NEW |
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/host/root_window_host_factory.h" | 10 #include "ash/host/root_window_host_factory.h" |
11 #include "ash/shell.h" | 11 #include "ash/shell.h" |
12 #include "ash/shell_window_ids.h" | 12 #include "ash/shell_window_ids.h" |
13 #include "ash/test/test_launcher_delegate.h" | 13 #include "ash/test/test_launcher_delegate.h" |
14 #include "ash/wm/stacking_controller.h" | 14 #include "ash/wm/stacking_controller.h" |
15 #include "ash/wm/window_util.h" | 15 #include "ash/wm/window_util.h" |
16 #include "content/public/test/test_browser_context.h" | 16 #include "content/public/test/test_browser_context.h" |
17 #include "ui/aura/window.h" | 17 #include "ui/aura/window.h" |
18 | 18 |
19 namespace ash { | 19 namespace ash { |
20 namespace test { | 20 namespace test { |
21 | 21 |
22 TestShellDelegate::TestShellDelegate() | 22 TestShellDelegate::TestShellDelegate() |
23 : locked_(false), | 23 : locked_(false), |
24 session_started_(true), | 24 session_started_(true), |
25 spoken_feedback_enabled_(false), | 25 spoken_feedback_enabled_(false), |
26 high_contrast_enabled_(false), | 26 high_contrast_enabled_(false), |
27 screen_magnifier_type_(MAGNIFIER_OFF), | 27 screen_magnifier_enabled_(false), |
| 28 screen_magnifier_type_(kDefaultMagnifierType), |
28 user_logged_in_(true), | 29 user_logged_in_(true), |
29 can_lock_screen_(true), | 30 can_lock_screen_(true), |
30 num_exit_requests_(0) { | 31 num_exit_requests_(0) { |
31 } | 32 } |
32 | 33 |
33 TestShellDelegate::~TestShellDelegate() { | 34 TestShellDelegate::~TestShellDelegate() { |
34 } | 35 } |
35 | 36 |
36 bool TestShellDelegate::IsUserLoggedIn() const { | 37 bool TestShellDelegate::IsUserLoggedIn() const { |
37 return user_logged_in_; | 38 return user_logged_in_; |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 } | 118 } |
118 | 119 |
119 void TestShellDelegate::ToggleHighContrast() { | 120 void TestShellDelegate::ToggleHighContrast() { |
120 high_contrast_enabled_ = !high_contrast_enabled_; | 121 high_contrast_enabled_ = !high_contrast_enabled_; |
121 } | 122 } |
122 | 123 |
123 bool TestShellDelegate::IsHighContrastEnabled() const { | 124 bool TestShellDelegate::IsHighContrastEnabled() const { |
124 return high_contrast_enabled_; | 125 return high_contrast_enabled_; |
125 } | 126 } |
126 | 127 |
127 void TestShellDelegate::SetMagnifier(const MagnifierType type) { | 128 void TestShellDelegate::SetMagnifierEnabled(bool enabled) { |
| 129 screen_magnifier_enabled_ = enabled; |
| 130 } |
| 131 |
| 132 void TestShellDelegate::SetMagnifierType(MagnifierType type) { |
128 screen_magnifier_type_ = type; | 133 screen_magnifier_type_ = type; |
129 } | 134 } |
130 | 135 |
| 136 bool TestShellDelegate::IsMagnifierEnabled() const { |
| 137 return screen_magnifier_enabled_; |
| 138 } |
| 139 |
131 MagnifierType TestShellDelegate::GetMagnifierType() const { | 140 MagnifierType TestShellDelegate::GetMagnifierType() const { |
132 return screen_magnifier_type_; | 141 return screen_magnifier_type_; |
133 } | 142 } |
134 | 143 |
135 bool TestShellDelegate::ShouldAlwaysShowAccessibilityMenu() const { | 144 bool TestShellDelegate::ShouldAlwaysShowAccessibilityMenu() const { |
136 return false; | 145 return false; |
137 } | 146 } |
138 | 147 |
139 app_list::AppListViewDelegate* TestShellDelegate::CreateAppListViewDelegate() { | 148 app_list::AppListViewDelegate* TestShellDelegate::CreateAppListViewDelegate() { |
140 return NULL; | 149 return NULL; |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 if (!user_logged_in) | 223 if (!user_logged_in) |
215 session_started_ = false; | 224 session_started_ = false; |
216 } | 225 } |
217 | 226 |
218 void TestShellDelegate::SetCanLockScreen(bool can_lock_screen) { | 227 void TestShellDelegate::SetCanLockScreen(bool can_lock_screen) { |
219 can_lock_screen_ = can_lock_screen; | 228 can_lock_screen_ = can_lock_screen; |
220 } | 229 } |
221 | 230 |
222 } // namespace test | 231 } // namespace test |
223 } // namespace ash | 232 } // namespace ash |
OLD | NEW |