| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 module ash.mojom; | 5 module ash.mojom; |
| 6 | 6 |
| 7 import "components/signin/public/interfaces/account_id.mojom"; |
| 7 import "skia/public/interfaces/bitmap.mojom"; | 8 import "skia/public/interfaces/bitmap.mojom"; |
| 8 | 9 |
| 9 // Matches session_manager::SessionState. | 10 // Matches session_manager::SessionState. |
| 10 enum SessionState { | 11 enum SessionState { |
| 11 // Default value, when session state hasn't been initialized yet. | 12 // Default value, when session state hasn't been initialized yet. |
| 12 UNKNOWN, | 13 UNKNOWN, |
| 13 | 14 |
| 14 // Running out of box UI. | 15 // Running out of box UI. |
| 15 OOBE, | 16 OOBE, |
| 16 | 17 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 | 67 |
| 67 // Info about a user session in ash. | 68 // Info about a user session in ash. |
| 68 struct UserSession { | 69 struct UserSession { |
| 69 // A user session id for the user session. It is generated by session manager | 70 // A user session id for the user session. It is generated by session manager |
| 70 // (chrome) when a user session starts and never changes during the lifetime | 71 // (chrome) when a user session starts and never changes during the lifetime |
| 71 // of the session manager. The number starts at 1 for the first user session | 72 // of the session manager. The number starts at 1 for the first user session |
| 72 // and incremented by one for each subsequent user session. | 73 // and incremented by one for each subsequent user session. |
| 73 uint32 session_id; | 74 uint32 session_id; |
| 74 | 75 |
| 75 UserType type; | 76 UserType type; |
| 76 string serialized_account_id; // TODO(xiyuan): Use typemapping for AccountId. | 77 signin.mojom.AccountId account_id; |
| 77 string display_name; | 78 string display_name; |
| 78 string display_email; | 79 string display_email; |
| 79 skia.mojom.Bitmap avatar; | 80 skia.mojom.Bitmap avatar; |
| 80 }; | 81 }; |
| 81 | 82 |
| 82 // Matches ash::AddUserSessionPolicy. | 83 // Matches ash::AddUserSessionPolicy. |
| 83 enum AddUserSessionPolicy { | 84 enum AddUserSessionPolicy { |
| 84 // Adding a user session is allowed. | 85 // Adding a user session is allowed. |
| 85 ALLOWED, | 86 ALLOWED, |
| 86 | 87 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 SetUserSessionOrder(array<uint32> user_session_ids); | 133 SetUserSessionOrder(array<uint32> user_session_ids); |
| 133 }; | 134 }; |
| 134 | 135 |
| 135 // Interface for ash to request session service from its client (e.g. Chrome). | 136 // Interface for ash to request session service from its client (e.g. Chrome). |
| 136 interface SessionControllerClient { | 137 interface SessionControllerClient { |
| 137 // Requests to lock screen. | 138 // Requests to lock screen. |
| 138 RequestLockScreen(); | 139 RequestLockScreen(); |
| 139 | 140 |
| 140 // Switch to the active user with |account_id| (if the user has already signed | 141 // Switch to the active user with |account_id| (if the user has already signed |
| 141 // in). | 142 // in). |
| 142 SwitchActiveUser(string account_id); | 143 SwitchActiveUser(signin.mojom.AccountId account_id); |
| 143 | 144 |
| 144 // Switch the active user to the next or previous user. | 145 // Switch the active user to the next or previous user. |
| 145 CycleActiveUser(bool next_user); | 146 CycleActiveUser(bool next_user); |
| 146 }; | 147 }; |
| OLD | NEW |