| 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_controller.h" | 10 #include "ash/common/session/session_controller.h" |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 base::Closure closure = base::Bind(&CheckCalledCallback, call_flag); | 321 base::Closure closure = base::Bind(&CheckCalledCallback, call_flag); |
| 322 lock_state_controller_->OnLockScreenHide(closure); | 322 lock_state_controller_->OnLockScreenHide(closure); |
| 323 } | 323 } |
| 324 | 324 |
| 325 void SystemUnlocks() { | 325 void SystemUnlocks() { |
| 326 lock_state_controller_->OnLockStateChanged(false); | 326 lock_state_controller_->OnLockStateChanged(false); |
| 327 GetSessionControllerClient()->UnlockScreen(); | 327 GetSessionControllerClient()->UnlockScreen(); |
| 328 } | 328 } |
| 329 | 329 |
| 330 void EnableMaximizeMode(bool enable) { | 330 void EnableMaximizeMode(bool enable) { |
| 331 WmShell::Get()->maximize_mode_controller()->EnableMaximizeModeWindowManager( | 331 Shell::Get()->maximize_mode_controller()->EnableMaximizeModeWindowManager( |
| 332 enable); | 332 enable); |
| 333 } | 333 } |
| 334 | 334 |
| 335 void Initialize(bool legacy_button, LoginStatus status) { | 335 void Initialize(bool legacy_button, LoginStatus status) { |
| 336 power_button_controller_->set_has_legacy_power_button_for_test( | 336 power_button_controller_->set_has_legacy_power_button_for_test( |
| 337 legacy_button); | 337 legacy_button); |
| 338 lock_state_controller_->OnLoginStateChanged(status); | 338 lock_state_controller_->OnLoginStateChanged(status); |
| 339 SetUserLoggedIn(status != LoginStatus::NOT_LOGGED_IN); | 339 SetUserLoggedIn(status != LoginStatus::NOT_LOGGED_IN); |
| 340 if (status == LoginStatus::GUEST) | 340 if (status == LoginStatus::GUEST) |
| 341 SetCanLockScreen(false); | 341 SetCanLockScreen(false); |
| (...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1074 ASSERT_EQ(0, delegate->handle_take_screenshot_count()); | 1074 ASSERT_EQ(0, delegate->handle_take_screenshot_count()); |
| 1075 PressVolumeDown(); | 1075 PressVolumeDown(); |
| 1076 PressPowerButton(); | 1076 PressPowerButton(); |
| 1077 ReleasePowerButton(); | 1077 ReleasePowerButton(); |
| 1078 ReleaseVolumeDown(); | 1078 ReleaseVolumeDown(); |
| 1079 EXPECT_EQ(1, delegate->handle_take_screenshot_count()); | 1079 EXPECT_EQ(1, delegate->handle_take_screenshot_count()); |
| 1080 } | 1080 } |
| 1081 | 1081 |
| 1082 } // namespace test | 1082 } // namespace test |
| 1083 } // namespace ash | 1083 } // namespace ash |
| OLD | NEW |