| 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 "chrome/browser/ui/ash/session_controller_client.h" | 5 #include "chrome/browser/ui/ash/session_controller_client.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 void SetClient(ash::mojom::SessionControllerClientPtr client) override {} | 114 void SetClient(ash::mojom::SessionControllerClientPtr client) override {} |
| 115 void SetSessionInfo(ash::mojom::SessionInfoPtr info) override { | 115 void SetSessionInfo(ash::mojom::SessionInfoPtr info) override { |
| 116 last_session_info_ = info->Clone(); | 116 last_session_info_ = info->Clone(); |
| 117 } | 117 } |
| 118 void UpdateUserSession(ash::mojom::UserSessionPtr user_session) override { | 118 void UpdateUserSession(ash::mojom::UserSessionPtr user_session) override { |
| 119 last_user_session_ = user_session->Clone(); | 119 last_user_session_ = user_session->Clone(); |
| 120 update_user_session_count_++; | 120 update_user_session_count_++; |
| 121 } | 121 } |
| 122 void SetUserSessionOrder( | 122 void SetUserSessionOrder( |
| 123 const std::vector<uint32_t>& user_session_order) override {} | 123 const std::vector<uint32_t>& user_session_order) override {} |
| 124 void StartLock(const StartLockCallback& callback) override {} | 124 void StartLock(StartLockCallback callback) override {} |
| 125 void NotifyChromeLockAnimationsComplete() override {} | 125 void NotifyChromeLockAnimationsComplete() override {} |
| 126 void RunUnlockAnimation(const RunUnlockAnimationCallback& callback) override { | 126 void RunUnlockAnimation(RunUnlockAnimationCallback callback) override {} |
| 127 } | |
| 128 void NotifyChromeTerminating() override {} | 127 void NotifyChromeTerminating() override {} |
| 129 | 128 |
| 130 private: | 129 private: |
| 131 mojo::Binding<ash::mojom::SessionController> binding_; | 130 mojo::Binding<ash::mojom::SessionController> binding_; |
| 132 | 131 |
| 133 ash::mojom::SessionInfoPtr last_session_info_; | 132 ash::mojom::SessionInfoPtr last_session_info_; |
| 134 ash::mojom::UserSessionPtr last_user_session_; | 133 ash::mojom::UserSessionPtr last_user_session_; |
| 135 int update_user_session_count_ = 0; | 134 int update_user_session_count_ = 0; |
| 136 | 135 |
| 137 DISALLOW_COPY_AND_ASSIGN(TestSessionController); | 136 DISALLOW_COPY_AND_ASSIGN(TestSessionController); |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 512 | 511 |
| 513 user_prefs->SetBoolean(prefs::kEnableAutoScreenLock, true); | 512 user_prefs->SetBoolean(prefs::kEnableAutoScreenLock, true); |
| 514 SessionControllerClient::FlushForTesting(); | 513 SessionControllerClient::FlushForTesting(); |
| 515 EXPECT_TRUE( | 514 EXPECT_TRUE( |
| 516 session_controller.last_session_info()->should_lock_screen_automatically); | 515 session_controller.last_session_info()->should_lock_screen_automatically); |
| 517 user_prefs->SetBoolean(prefs::kEnableAutoScreenLock, false); | 516 user_prefs->SetBoolean(prefs::kEnableAutoScreenLock, false); |
| 518 SessionControllerClient::FlushForTesting(); | 517 SessionControllerClient::FlushForTesting(); |
| 519 EXPECT_FALSE( | 518 EXPECT_FALSE( |
| 520 session_controller.last_session_info()->should_lock_screen_automatically); | 519 session_controller.last_session_info()->should_lock_screen_automatically); |
| 521 } | 520 } |
| OLD | NEW |