| 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/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 user_logged_in_(true), | 25 user_logged_in_(true), |
| 26 can_lock_screen_(true), | 26 can_lock_screen_(true), |
| 27 is_search_key_acting_as_function_key_(false), |
| 27 num_exit_requests_(0) { | 28 num_exit_requests_(0) { |
| 28 } | 29 } |
| 29 | 30 |
| 30 TestShellDelegate::~TestShellDelegate() { | 31 TestShellDelegate::~TestShellDelegate() { |
| 31 } | 32 } |
| 32 | 33 |
| 33 bool TestShellDelegate::IsUserLoggedIn() { | 34 bool TestShellDelegate::IsUserLoggedIn() { |
| 34 return user_logged_in_; | 35 return user_logged_in_; |
| 35 } | 36 } |
| 36 | 37 |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 } | 165 } |
| 165 | 166 |
| 166 double TestShellDelegate::GetSavedScreenMagnifierScale() { | 167 double TestShellDelegate::GetSavedScreenMagnifierScale() { |
| 167 return std::numeric_limits<double>::min(); | 168 return std::numeric_limits<double>::min(); |
| 168 } | 169 } |
| 169 | 170 |
| 170 aura::client::StackingClient* TestShellDelegate::CreateStackingClient() { | 171 aura::client::StackingClient* TestShellDelegate::CreateStackingClient() { |
| 171 return new StackingController; | 172 return new StackingController; |
| 172 } | 173 } |
| 173 | 174 |
| 175 bool TestShellDelegate::IsSearchKeyActingAsFunctionKey() const { |
| 176 return is_search_key_acting_as_function_key_; |
| 177 } |
| 178 |
| 174 void TestShellDelegate::SetSessionStarted(bool session_started) { | 179 void TestShellDelegate::SetSessionStarted(bool session_started) { |
| 175 session_started_ = session_started; | 180 session_started_ = session_started; |
| 176 if (session_started) | 181 if (session_started) |
| 177 user_logged_in_ = true; | 182 user_logged_in_ = true; |
| 178 } | 183 } |
| 179 | 184 |
| 180 void TestShellDelegate::SetUserLoggedIn(bool user_logged_in) { | 185 void TestShellDelegate::SetUserLoggedIn(bool user_logged_in) { |
| 181 user_logged_in_ = user_logged_in; | 186 user_logged_in_ = user_logged_in; |
| 182 if (!user_logged_in) | 187 if (!user_logged_in) |
| 183 session_started_ = false; | 188 session_started_ = false; |
| 184 } | 189 } |
| 185 | 190 |
| 186 void TestShellDelegate::SetCanLockScreen(bool can_lock_screen) { | 191 void TestShellDelegate::SetCanLockScreen(bool can_lock_screen) { |
| 187 can_lock_screen_ = can_lock_screen; | 192 can_lock_screen_ = can_lock_screen; |
| 188 } | 193 } |
| 189 | 194 |
| 190 } // namespace test | 195 } // namespace test |
| 191 } // namespace ash | 196 } // namespace ash |
| OLD | NEW |