OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 module ash.mojom; |
| 6 |
| 7 import "components/signin/public/interfaces/account_id.mojom"; |
| 8 |
| 9 // Allows clients (e.g. Chrome browser) to control the ash lock screen. |
| 10 interface LockScreen { |
| 11 // Sets the client interface. |
| 12 SetClient(LockScreenClient client); |
| 13 |
| 14 // Requests to show error message in the ash lock screen. |
| 15 // TODO(xiaoyinh): login_attempts is probabaly not needed from chrome, |
| 16 // remove it when we start to count the login attempts in ash lock screen. |
| 17 // |login_attempts|: The number of the login authentication attempts. |
| 18 // |error_text|: The error text to be shown in lock screen. |
| 19 // |help_link_text|: The help link to be shown in lock screen. |
| 20 // |help_topic_id|: The id of the help app topic regarding this error. |
| 21 ShowErrorMessage(int32 login_attempts, |
| 22 string error_text, |
| 23 string help_link_text, |
| 24 int32 help_topic_id); |
| 25 |
| 26 // Requests to close any displayed error messages in ash lock screen. |
| 27 ClearErrors(); |
| 28 }; |
| 29 |
| 30 // Allows ash lock screen to control a client (e.g. Chrome browser). Requests |
| 31 // often involve preferences or talk to cryptohome that is not available to ash. |
| 32 interface LockScreenClient { |
| 33 // Request user authentication in chrome. |
| 34 // If auth succeeds: |
| 35 // chrome will hide the lock screen and clear any displayed error messages. |
| 36 // If auth fails: |
| 37 // chrome will request lock screen to show error messages. |
| 38 // |account_id|: The account id of the user we are authenticating. |
| 39 // |hashed_password|: The hashed password of the user. |
| 40 // |authenticated_by_pin|: True if we are using pin to authenticate. |
| 41 AuthenticateUser(signin.mojom.AccountId account_id, |
| 42 string hashed_password, |
| 43 bool authenticated_by_pin); |
| 44 }; |
OLD | NEW |