| 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_(MAGNIFIER_DEFAULT), |
| 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::SetMagnifier(bool enabled, const MagnifierType type) { |
| 129 screen_magnifier_enabled_ = enabled; |
| 128 screen_magnifier_type_ = type; | 130 screen_magnifier_type_ = type; |
| 129 } | 131 } |
| 130 | 132 |
| 133 bool TestShellDelegate::IsMagnifierEnabled() const { |
| 134 return screen_magnifier_enabled_; |
| 135 } |
| 136 |
| 131 MagnifierType TestShellDelegate::GetMagnifierType() const { | 137 MagnifierType TestShellDelegate::GetMagnifierType() const { |
| 132 return screen_magnifier_type_; | 138 return screen_magnifier_type_; |
| 133 } | 139 } |
| 134 | 140 |
| 135 bool TestShellDelegate::ShouldAlwaysShowAccessibilityMenu() const { | 141 bool TestShellDelegate::ShouldAlwaysShowAccessibilityMenu() const { |
| 136 return false; | 142 return false; |
| 137 } | 143 } |
| 138 | 144 |
| 139 app_list::AppListViewDelegate* TestShellDelegate::CreateAppListViewDelegate() { | 145 app_list::AppListViewDelegate* TestShellDelegate::CreateAppListViewDelegate() { |
| 140 return NULL; | 146 return NULL; |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 if (!user_logged_in) | 220 if (!user_logged_in) |
| 215 session_started_ = false; | 221 session_started_ = false; |
| 216 } | 222 } |
| 217 | 223 |
| 218 void TestShellDelegate::SetCanLockScreen(bool can_lock_screen) { | 224 void TestShellDelegate::SetCanLockScreen(bool can_lock_screen) { |
| 219 can_lock_screen_ = can_lock_screen; | 225 can_lock_screen_ = can_lock_screen; |
| 220 } | 226 } |
| 221 | 227 |
| 222 } // namespace test | 228 } // namespace test |
| 223 } // namespace ash | 229 } // namespace ash |
| OLD | NEW |