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 "components/signin/public/interfaces/account_id.mojom"; | 7 import "components/signin/public/interfaces/account_id.mojom"; |
8 import "mojo/common/string16.mojom"; | 8 import "mojo/common/string16.mojom"; |
9 import "mojo/common/values.mojom"; | 9 import "mojo/common/values.mojom"; |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... |
27 mojo.common.mojom.String16 aria_label; | 27 mojo.common.mojom.String16 aria_label; |
28 bool hardlock_on_click; | 28 bool hardlock_on_click; |
29 bool is_trial_run; | 29 bool is_trial_run; |
30 }; | 30 }; |
31 | 31 |
32 // Allows clients (e.g. Chrome browser) to control the ash lock screen. | 32 // Allows clients (e.g. Chrome browser) to control the ash lock screen. |
33 interface LockScreen { | 33 interface LockScreen { |
34 // Sets the client interface. | 34 // Sets the client interface. |
35 SetClient(LockScreenClient client); | 35 SetClient(LockScreenClient client); |
36 | 36 |
| 37 // Displays the lock screen. |did_show| is true iff the lock UI was |
| 38 // successfully displayed. |
| 39 ShowLockScreen() => (bool did_show); |
| 40 |
37 // Requests to show error message in the ash lock screen. | 41 // Requests to show error message in the ash lock screen. |
38 // TODO(xiaoyinh): login_attempts is probabaly not needed from chrome, | 42 // TODO(xiaoyinh): login_attempts is probabaly not needed from chrome, |
39 // remove it when we start to count the login attempts in ash lock screen. | 43 // remove it when we start to count the login attempts in ash lock screen. |
40 // |login_attempts|: The number of the login authentication attempts. | 44 // |login_attempts|: The number of the login authentication attempts. |
41 // |error_text|: The error text to be shown in lock screen. | 45 // |error_text|: The error text to be shown in lock screen. |
42 // |help_link_text|: The help link to be shown in lock screen. | 46 // |help_link_text|: The help link to be shown in lock screen. |
43 // |help_topic_id|: The id of the help app topic regarding this error. | 47 // |help_topic_id|: The id of the help app topic regarding this error. |
44 ShowErrorMessage(int32 login_attempts, | 48 ShowErrorMessage(int32 login_attempts, |
45 string error_text, | 49 string error_text, |
46 string help_link_text, | 50 string help_link_text, |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 // often involve preferences or talk to cryptohome that is not available to ash. | 84 // often involve preferences or talk to cryptohome that is not available to ash. |
81 interface LockScreenClient { | 85 interface LockScreenClient { |
82 // Request user authentication in chrome. | 86 // Request user authentication in chrome. |
83 // If auth succeeds: | 87 // If auth succeeds: |
84 // chrome will hide the lock screen and clear any displayed error messages. | 88 // chrome will hide the lock screen and clear any displayed error messages. |
85 // If auth fails: | 89 // If auth fails: |
86 // chrome will request lock screen to show error messages. | 90 // chrome will request lock screen to show error messages. |
87 // |account_id|: The account id of the user we are authenticating. | 91 // |account_id|: The account id of the user we are authenticating. |
88 // |hashed_password|: The hashed password of the user. | 92 // |hashed_password|: The hashed password of the user. |
89 // |authenticated_by_pin|: True if we are using pin to authenticate. | 93 // |authenticated_by_pin|: True if we are using pin to authenticate. |
| 94 // |
| 95 // The result will be set to true if auth was successful, false if not. |
90 AuthenticateUser(signin.mojom.AccountId account_id, | 96 AuthenticateUser(signin.mojom.AccountId account_id, |
91 string hashed_password, | 97 string hashed_password, |
92 » bool authenticated_by_pin); | 98 bool authenticated_by_pin) => (bool auth_success); |
93 | 99 |
94 // Request to attempt easy unlock in chrome. | 100 // Request to attempt easy unlock in chrome. |
95 // |account_id|: The account id of the user we are authenticating. | 101 // |account_id|: The account id of the user we are authenticating. |
96 AttemptUnlock(signin.mojom.AccountId account_id); | 102 AttemptUnlock(signin.mojom.AccountId account_id); |
97 | 103 |
98 // Request to hard lock the user pod. | 104 // Request to hard lock the user pod. |
99 // |account_id|: The account id of the user in the user pod. | 105 // |account_id|: The account id of the user in the user pod. |
100 HardlockPod(signin.mojom.AccountId account_id); | 106 HardlockPod(signin.mojom.AccountId account_id); |
101 | 107 |
102 // Record clicks on the lock icon in the user pod. | 108 // Record clicks on the lock icon in the user pod. |
103 // |account_id|: The account id of the user in the user pod. | 109 // |account_id|: The account id of the user in the user pod. |
104 RecordClickOnLockIcon(signin.mojom.AccountId account_id); | 110 RecordClickOnLockIcon(signin.mojom.AccountId account_id); |
105 }; | 111 }; |
OLD | NEW |