Chromium Code Reviews| Index: chrome/common/extensions/api/easy_unlock_private.idl |
| diff --git a/chrome/common/extensions/api/easy_unlock_private.idl b/chrome/common/extensions/api/easy_unlock_private.idl |
| index 1e62e0eeb4ae9efe102d2799aef6c7c93a03ee2f..ec0d3ea07631923fb88bdd033058e9674c22639a 100644 |
| --- a/chrome/common/extensions/api/easy_unlock_private.idl |
| +++ b/chrome/common/extensions/api/easy_unlock_private.idl |
| @@ -129,6 +129,20 @@ |
| DOMString? psk; |
| }; |
| + // The information about a user associated with Easy unlock service. |
| + dictionary UserInfo { |
| + // The user id. |
| + DOMString userId; |
| + |
| + // Whether the user is logged in. If not logged in, the app is running on |
| + // the signin screen. |
| + boolean loggedIn; |
| + |
| + // Whether all data needed to use Easy unlock service has been loaded for |
| + // the user. |
| + boolean dataReady; |
| + }; |
| + |
| // Callback for crypto methods that return a single array buffer. |
| callback DataCallback = void(optional ArrayBuffer data); |
| @@ -148,6 +162,12 @@ |
| // Callback for the getRemoteDevices() method. |
| callback GetRemoteDevicesCallback = void(Device[] devices); |
| + // Callback for the |getUserInfo()| method. Note that the callback argument is |
| + // list for future use (on signing screen there may be more than one user |
|
Yoyo Zhou
2014/09/22 23:29:06
is a list
signin
tbarzic
2014/09/22 23:43:51
Done.
|
| + // associated with the easy unlock service). Currently the method returns at |
| + // most one user. |
| + callback GetUserInfoCallback = void(UserInfo[] users); |
| + |
| interface Functions { |
| // Gets localized strings required to render the API. |
| // |
| @@ -268,5 +288,16 @@ |
| // success, the user session will be started. |
| static void trySignInSecret(ArrayBuffer signInSecret, |
| EmptyCallback callback); |
| + |
| + // Retrieves information about the user associated with the Easy unlock |
| + // service. |
| + static void getUserInfo(GetUserInfoCallback callback); |
| + }; |
| + |
| + interface Events { |
| + // Event dispatched when the data for the user currently associated with |
|
Yoyo Zhou
2014/09/22 23:29:07
Usually we write "Fired when"
tbarzic
2014/09/22 23:43:51
Done.
|
| + // Easy unlock service. |
|
Yoyo Zhou
2014/09/22 23:29:07
... is updated? changes? This looks incomplete.
tbarzic
2014/09/22 23:43:51
Done.
|
| + // |userInfo| The updated user information. |
| + static void onUserInfoUpdated(UserInfo userInfo); |
| }; |
| }; |