| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/wm/lock_state_controller.h" | 5 #include "ash/wm/lock_state_controller.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "ash/common/session/session_state_delegate.h" | 10 #include "ash/common/session/session_state_delegate.h" |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 base::Closure closure = base::Bind(&CheckCalledCallback, call_flag); | 294 base::Closure closure = base::Bind(&CheckCalledCallback, call_flag); |
| 295 lock_state_controller_->OnLockScreenHide(closure); | 295 lock_state_controller_->OnLockScreenHide(closure); |
| 296 } | 296 } |
| 297 | 297 |
| 298 void SystemUnlocks() { | 298 void SystemUnlocks() { |
| 299 lock_state_controller_->OnLockStateChanged(false); | 299 lock_state_controller_->OnLockStateChanged(false); |
| 300 WmShell::Get()->GetSessionStateDelegate()->UnlockScreen(); | 300 WmShell::Get()->GetSessionStateDelegate()->UnlockScreen(); |
| 301 } | 301 } |
| 302 | 302 |
| 303 void EnableMaximizeMode(bool enable) { | 303 void EnableMaximizeMode(bool enable) { |
| 304 Shell::GetInstance() | 304 WmShell::Get()->maximize_mode_controller()->EnableMaximizeModeWindowManager( |
| 305 ->maximize_mode_controller() | 305 enable); |
| 306 ->EnableMaximizeModeWindowManager(enable); | |
| 307 } | 306 } |
| 308 | 307 |
| 309 void Initialize(bool legacy_button, LoginStatus status) { | 308 void Initialize(bool legacy_button, LoginStatus status) { |
| 310 power_button_controller_->set_has_legacy_power_button_for_test( | 309 power_button_controller_->set_has_legacy_power_button_for_test( |
| 311 legacy_button); | 310 legacy_button); |
| 312 lock_state_controller_->OnLoginStateChanged(status); | 311 lock_state_controller_->OnLoginStateChanged(status); |
| 313 SetUserLoggedIn(status != LoginStatus::NOT_LOGGED_IN); | 312 SetUserLoggedIn(status != LoginStatus::NOT_LOGGED_IN); |
| 314 if (status == LoginStatus::GUEST) | 313 if (status == LoginStatus::GUEST) |
| 315 SetCanLockScreen(false); | 314 SetCanLockScreen(false); |
| 316 lock_state_controller_->OnLockStateChanged(false); | 315 lock_state_controller_->OnLockStateChanged(false); |
| (...skipping 763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1080 ReleasePowerButton(); | 1079 ReleasePowerButton(); |
| 1081 | 1080 |
| 1082 ExpectPreLockAnimationStarted(); | 1081 ExpectPreLockAnimationStarted(); |
| 1083 | 1082 |
| 1084 test_animator_->CompleteAllAnimations(true); | 1083 test_animator_->CompleteAllAnimations(true); |
| 1085 EXPECT_EQ(1, lock_state_controller_delegate_->num_lock_requests()); | 1084 EXPECT_EQ(1, lock_state_controller_delegate_->num_lock_requests()); |
| 1086 } | 1085 } |
| 1087 | 1086 |
| 1088 } // namespace test | 1087 } // namespace test |
| 1089 } // namespace ash | 1088 } // namespace ash |
| OLD | NEW |