Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: ash/public/interfaces/session_controller.mojom

Issue 2617763003: Add a mojo interface for AccountId (Closed)
Patch Set: rebase Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/public/interfaces/BUILD.gn ('k') | chrome/browser/ui/ash/session_controller_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 };
OLDNEW
« no previous file with comments | « ash/public/interfaces/BUILD.gn ('k') | chrome/browser/ui/ash/session_controller_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698