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

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

Issue 2937553002: Create Mojo Struct for user information used in login/lock screen. (Closed)
Patch Set: populate user's avatar Created 3 years, 6 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
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 "ash/public/interfaces/login_user_info.mojom";
7 import "components/signin/public/interfaces/account_id.mojom"; 8 import "components/signin/public/interfaces/account_id.mojom";
8 import "mojo/common/string16.mojom"; 9 import "mojo/common/string16.mojom";
9 import "mojo/common/values.mojom";
10
11 // Supported authentication types. Keep in sync with enum in
12 // screenlock_bridge.h
13 enum AuthType {
14 OFFLINE_PASSWORD,
15 ONLINE_SIGN_IN,
16 NUMERIC_PIN,
17 USER_CLICK,
18 EXPAND_THEN_USER_CLICK,
19 FORCE_OFFLINE_PASSWORD,
20 };
21
22 // Information about the custom icon in the user pod.
23 struct UserPodCustomIconOptions {
24 string id;
25 mojo.common.mojom.String16 tooltip;
26 bool autoshow_tooltip;
27 mojo.common.mojom.String16 aria_label;
28 bool hardlock_on_click;
29 bool is_trial_run;
30 };
31 10
32 // Allows clients (e.g. Chrome browser) to control the ash lock screen. 11 // Allows clients (e.g. Chrome browser) to control the ash lock screen.
33 interface LockScreen { 12 interface LockScreen {
34 // Sets the client interface. 13 // Sets the client interface.
35 SetClient(LockScreenClient client); 14 SetClient(LockScreenClient client);
36 15
37 // Displays the lock screen. |did_show| is true iff the lock UI was 16 // Displays the lock screen. |did_show| is true iff the lock UI was
38 // successfully displayed. 17 // successfully displayed.
39 ShowLockScreen() => (bool did_show); 18 ShowLockScreen() => (bool did_show);
40 19
(...skipping 24 matching lines...) Expand all
65 44
66 // Requests to set the authentication type. 45 // Requests to set the authentication type.
67 // |account_id|: The account id of the user in the user pod. 46 // |account_id|: The account id of the user in the user pod.
68 // |auth_type|: Authentication type. 47 // |auth_type|: Authentication type.
69 // |initial_value|: A message shown in the password field of the user pod. 48 // |initial_value|: A message shown in the password field of the user pod.
70 SetAuthType(signin.mojom.AccountId account_id, 49 SetAuthType(signin.mojom.AccountId account_id,
71 AuthType auth_type, 50 AuthType auth_type,
72 mojo.common.mojom.String16 initial_value); 51 mojo.common.mojom.String16 initial_value);
73 52
74 // Requests to load users in the lock screen. 53 // Requests to load users in the lock screen.
75 // TODO: create a mojo struct for |users|, this contains user information
76 // for login/lock screen, some of which might not be needed for the new
77 // view-based UI. See crbug.com/729687.
78 // |users|: A list of users who can unlock the device. 54 // |users|: A list of users who can unlock the device.
79 // |show_guest|: Whether to show guest session button. 55 // |show_guest|: Whether to show guest session button.
80 LoadUsers(mojo.common.mojom.ListValue users, bool show_guest); 56 LoadUsers(array<LoginUserInfo> users, bool show_guest);
81 }; 57 };
82 58
83 // Allows ash lock screen to control a client (e.g. Chrome browser). Requests 59 // Allows ash lock screen to control a client (e.g. Chrome browser). Requests
84 // often involve preferences or talk to cryptohome that is not available to ash. 60 // often involve preferences or talk to cryptohome that is not available to ash.
85 interface LockScreenClient { 61 interface LockScreenClient {
86 // Request user authentication in chrome. 62 // Request user authentication in chrome.
87 // If auth succeeds: 63 // If auth succeeds:
88 // chrome will hide the lock screen and clear any displayed error messages. 64 // chrome will hide the lock screen and clear any displayed error messages.
89 // If auth fails: 65 // If auth fails:
90 // chrome will request lock screen to show error messages. 66 // chrome will request lock screen to show error messages.
(...skipping 11 matching lines...) Expand all
102 AttemptUnlock(signin.mojom.AccountId account_id); 78 AttemptUnlock(signin.mojom.AccountId account_id);
103 79
104 // Request to hard lock the user pod. 80 // Request to hard lock the user pod.
105 // |account_id|: The account id of the user in the user pod. 81 // |account_id|: The account id of the user in the user pod.
106 HardlockPod(signin.mojom.AccountId account_id); 82 HardlockPod(signin.mojom.AccountId account_id);
107 83
108 // Record clicks on the lock icon in the user pod. 84 // Record clicks on the lock icon in the user pod.
109 // |account_id|: The account id of the user in the user pod. 85 // |account_id|: The account id of the user in the user pod.
110 RecordClickOnLockIcon(signin.mojom.AccountId account_id); 86 RecordClickOnLockIcon(signin.mojom.AccountId account_id);
111 }; 87 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698