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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 void SetClient(ash::mojom::SessionControllerClientPtr client) override {} | 94 void SetClient(ash::mojom::SessionControllerClientPtr client) override {} |
95 void SetSessionInfo(ash::mojom::SessionInfoPtr info) override { | 95 void SetSessionInfo(ash::mojom::SessionInfoPtr info) override { |
96 last_session_info_ = info->Clone(); | 96 last_session_info_ = info->Clone(); |
97 } | 97 } |
98 void UpdateUserSession(ash::mojom::UserSessionPtr user_session) override { | 98 void UpdateUserSession(ash::mojom::UserSessionPtr user_session) override { |
99 last_user_session_ = user_session->Clone(); | 99 last_user_session_ = user_session->Clone(); |
100 update_user_session_count_++; | 100 update_user_session_count_++; |
101 } | 101 } |
102 void SetUserSessionOrder( | 102 void SetUserSessionOrder( |
103 const std::vector<uint32_t>& user_session_order) override {} | 103 const std::vector<uint32_t>& user_session_order) override {} |
104 void StartLock(const StartLockCallback& callback) override {} | 104 void StartLock(StartLockCallback callback) override {} |
105 void NotifyChromeLockAnimationsComplete() override {} | 105 void NotifyChromeLockAnimationsComplete() override {} |
106 void RunUnlockAnimation(const RunUnlockAnimationCallback& callback) override { | 106 void RunUnlockAnimation(RunUnlockAnimationCallback callback) override {} |
107 } | |
108 void NotifyChromeTerminating() override {} | 107 void NotifyChromeTerminating() override {} |
109 | 108 |
110 private: | 109 private: |
111 mojo::Binding<ash::mojom::SessionController> binding_; | 110 mojo::Binding<ash::mojom::SessionController> binding_; |
112 | 111 |
113 ash::mojom::SessionInfoPtr last_session_info_; | 112 ash::mojom::SessionInfoPtr last_session_info_; |
114 ash::mojom::UserSessionPtr last_user_session_; | 113 ash::mojom::UserSessionPtr last_user_session_; |
115 int update_user_session_count_ = 0; | 114 int update_user_session_count_ = 0; |
116 | 115 |
117 DISALLOW_COPY_AND_ASSIGN(TestSessionController); | 116 DISALLOW_COPY_AND_ASSIGN(TestSessionController); |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
450 | 449 |
451 // Simulate an update to the custodian information. | 450 // Simulate an update to the custodian information. |
452 prefs->SetString(prefs::kSupervisedUserCustodianEmail, "parent3@test.com"); | 451 prefs->SetString(prefs::kSupervisedUserCustodianEmail, "parent3@test.com"); |
453 client.OnCustodianInfoChanged(); | 452 client.OnCustodianInfoChanged(); |
454 SessionControllerClient::FlushForTesting(); | 453 SessionControllerClient::FlushForTesting(); |
455 | 454 |
456 // The updated custodian was sent over the mojo interface. | 455 // The updated custodian was sent over the mojo interface. |
457 EXPECT_EQ("parent3@test.com", | 456 EXPECT_EQ("parent3@test.com", |
458 session_controller.last_user_session()->custodian_email); | 457 session_controller.last_user_session()->custodian_email); |
459 } | 458 } |
OLD | NEW |