| 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_enabled_(false), | 27 screen_magnifier_type_(MAGNIFIER_OFF), |
| 28 screen_magnifier_type_(kDefaultMagnifierType), | |
| 29 user_logged_in_(true), | 28 user_logged_in_(true), |
| 30 can_lock_screen_(true), | 29 can_lock_screen_(true), |
| 31 num_exit_requests_(0) { | 30 num_exit_requests_(0) { |
| 32 } | 31 } |
| 33 | 32 |
| 34 TestShellDelegate::~TestShellDelegate() { | 33 TestShellDelegate::~TestShellDelegate() { |
| 35 } | 34 } |
| 36 | 35 |
| 37 bool TestShellDelegate::IsUserLoggedIn() const { | 36 bool TestShellDelegate::IsUserLoggedIn() const { |
| 38 return user_logged_in_; | 37 return user_logged_in_; |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 } | 117 } |
| 119 | 118 |
| 120 void TestShellDelegate::ToggleHighContrast() { | 119 void TestShellDelegate::ToggleHighContrast() { |
| 121 high_contrast_enabled_ = !high_contrast_enabled_; | 120 high_contrast_enabled_ = !high_contrast_enabled_; |
| 122 } | 121 } |
| 123 | 122 |
| 124 bool TestShellDelegate::IsHighContrastEnabled() const { | 123 bool TestShellDelegate::IsHighContrastEnabled() const { |
| 125 return high_contrast_enabled_; | 124 return high_contrast_enabled_; |
| 126 } | 125 } |
| 127 | 126 |
| 128 void TestShellDelegate::SetMagnifierEnabled(bool enabled) { | 127 void TestShellDelegate::SetMagnifier(const MagnifierType type) { |
| 129 screen_magnifier_enabled_ = enabled; | |
| 130 } | |
| 131 | |
| 132 void TestShellDelegate::SetMagnifierType(MagnifierType type) { | |
| 133 screen_magnifier_type_ = type; | 128 screen_magnifier_type_ = type; |
| 134 } | 129 } |
| 135 | 130 |
| 136 bool TestShellDelegate::IsMagnifierEnabled() const { | |
| 137 return screen_magnifier_enabled_; | |
| 138 } | |
| 139 | |
| 140 MagnifierType TestShellDelegate::GetMagnifierType() const { | 131 MagnifierType TestShellDelegate::GetMagnifierType() const { |
| 141 return screen_magnifier_type_; | 132 return screen_magnifier_type_; |
| 142 } | 133 } |
| 143 | 134 |
| 144 bool TestShellDelegate::ShouldAlwaysShowAccessibilityMenu() const { | 135 bool TestShellDelegate::ShouldAlwaysShowAccessibilityMenu() const { |
| 145 return false; | 136 return false; |
| 146 } | 137 } |
| 147 | 138 |
| 148 app_list::AppListViewDelegate* TestShellDelegate::CreateAppListViewDelegate() { | 139 app_list::AppListViewDelegate* TestShellDelegate::CreateAppListViewDelegate() { |
| 149 return NULL; | 140 return NULL; |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 if (!user_logged_in) | 214 if (!user_logged_in) |
| 224 session_started_ = false; | 215 session_started_ = false; |
| 225 } | 216 } |
| 226 | 217 |
| 227 void TestShellDelegate::SetCanLockScreen(bool can_lock_screen) { | 218 void TestShellDelegate::SetCanLockScreen(bool can_lock_screen) { |
| 228 can_lock_screen_ = can_lock_screen; | 219 can_lock_screen_ = can_lock_screen; |
| 229 } | 220 } |
| 230 | 221 |
| 231 } // namespace test | 222 } // namespace test |
| 232 } // namespace ash | 223 } // namespace ash |
| OLD | NEW |