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" |
(...skipping 15 matching lines...) Expand all Loading... |
26 screen_magnifier_type_(MAGNIFIER_OFF), | 26 screen_magnifier_type_(MAGNIFIER_OFF), |
27 user_logged_in_(true), | 27 user_logged_in_(true), |
28 can_lock_screen_(true), | 28 can_lock_screen_(true), |
29 is_search_key_acting_as_function_key_(false), | 29 is_search_key_acting_as_function_key_(false), |
30 num_exit_requests_(0) { | 30 num_exit_requests_(0) { |
31 } | 31 } |
32 | 32 |
33 TestShellDelegate::~TestShellDelegate() { | 33 TestShellDelegate::~TestShellDelegate() { |
34 } | 34 } |
35 | 35 |
36 bool TestShellDelegate::IsUserLoggedIn() { | 36 bool TestShellDelegate::IsUserLoggedIn() const { |
37 return user_logged_in_; | 37 return user_logged_in_; |
38 } | 38 } |
39 | 39 |
40 bool TestShellDelegate::IsSessionStarted() { | 40 bool TestShellDelegate::IsSessionStarted() const { |
41 return session_started_; | 41 return session_started_; |
42 } | 42 } |
43 | 43 |
44 bool TestShellDelegate::IsFirstRunAfterBoot() { | 44 bool TestShellDelegate::IsFirstRunAfterBoot() const { |
45 return false; | 45 return false; |
46 } | 46 } |
47 | 47 |
48 bool TestShellDelegate::CanLockScreen() { | 48 bool TestShellDelegate::CanLockScreen() const { |
49 return user_logged_in_ && can_lock_screen_; | 49 return user_logged_in_ && can_lock_screen_; |
50 } | 50 } |
51 | 51 |
52 void TestShellDelegate::LockScreen() { | 52 void TestShellDelegate::LockScreen() { |
53 locked_ = true; | 53 locked_ = true; |
54 } | 54 } |
55 | 55 |
56 void TestShellDelegate::UnlockScreen() { | 56 void TestShellDelegate::UnlockScreen() { |
57 locked_ = false; | 57 locked_ = false; |
58 } | 58 } |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 if (!user_logged_in) | 213 if (!user_logged_in) |
214 session_started_ = false; | 214 session_started_ = false; |
215 } | 215 } |
216 | 216 |
217 void TestShellDelegate::SetCanLockScreen(bool can_lock_screen) { | 217 void TestShellDelegate::SetCanLockScreen(bool can_lock_screen) { |
218 can_lock_screen_ = can_lock_screen; | 218 can_lock_screen_ = can_lock_screen; |
219 } | 219 } |
220 | 220 |
221 } // namespace test | 221 } // namespace test |
222 } // namespace ash | 222 } // namespace ash |
OLD | NEW |