OLD | NEW |
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 Loading... |
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 // Notification if pin is enabled or disabled for the given user. | 58 // Notification if pin is enabled or disabled for the given user. |
83 // |account_id|: The account id of the user in the user pod. | 59 // |account_id|: The account id of the user in the user pod. |
84 // |is_enabled|: True if pin unlock is enabled. | 60 // |is_enabled|: True if pin unlock is enabled. |
85 SetPinEnabledForUser(signin.mojom.AccountId account_id, bool is_enabled); | 61 SetPinEnabledForUser(signin.mojom.AccountId account_id, bool is_enabled); |
86 }; | 62 }; |
87 | 63 |
88 // Allows ash lock screen to control a client (e.g. Chrome browser). Requests | 64 // Allows ash lock screen to control a client (e.g. Chrome browser). Requests |
89 // often involve preferences or talk to cryptohome that is not available to ash. | 65 // often involve preferences or talk to cryptohome that is not available to ash. |
90 interface LockScreenClient { | 66 interface LockScreenClient { |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 | 98 |
123 // Load wallpaper of user with |account_id|. | 99 // Load wallpaper of user with |account_id|. |
124 LoadWallpaper(signin.mojom.AccountId account_id); | 100 LoadWallpaper(signin.mojom.AccountId account_id); |
125 | 101 |
126 // Sign out current user. | 102 // Sign out current user. |
127 SignOutUser(); | 103 SignOutUser(); |
128 | 104 |
129 // User with |account_id| has reached maximum incorrect password attempts. | 105 // User with |account_id| has reached maximum incorrect password attempts. |
130 OnMaxIncorrectPasswordAttempted(signin.mojom.AccountId account_id); | 106 OnMaxIncorrectPasswordAttempted(signin.mojom.AccountId account_id); |
131 }; | 107 }; |
OLD | NEW |