OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // <code>chrome.easyUnlockPrivate</code> API that provides hooks to Chrome to | 5 // <code>chrome.easyUnlockPrivate</code> API that provides hooks to Chrome to |
6 // be used by Easy Unlock component app. | 6 // be used by Easy Unlock component app. |
7 namespace easyUnlockPrivate { | 7 namespace easyUnlockPrivate { |
8 // Signature algorithms supported by the crypto library methods used by | 8 // Signature algorithms supported by the crypto library methods used by |
9 // Easy Unlock. | 9 // Easy Unlock. |
10 enum SignatureType { | 10 enum SignatureType { |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 | 136 |
137 // The information about a user associated with Easy unlock service. | 137 // The information about a user associated with Easy unlock service. |
138 dictionary UserInfo { | 138 dictionary UserInfo { |
139 // The user id. | 139 // The user id. |
140 DOMString userId; | 140 DOMString userId; |
141 | 141 |
142 // Whether the user is logged in. If not logged in, the app is running on | 142 // Whether the user is logged in. If not logged in, the app is running on |
143 // the signin screen. | 143 // the signin screen. |
144 boolean loggedIn; | 144 boolean loggedIn; |
145 | 145 |
| 146 // Whether to check if the remote device is in very close proximity before |
| 147 // allowing unlock (~1 feet). |
| 148 boolean checkCloseProximity; |
| 149 |
146 // Whether all data needed to use Easy unlock service has been loaded for | 150 // Whether all data needed to use Easy unlock service has been loaded for |
147 // the user. | 151 // the user. |
148 boolean dataReady; | 152 boolean dataReady; |
149 }; | 153 }; |
150 | 154 |
151 // Callback for crypto methods that return a single array buffer. | 155 // Callback for crypto methods that return a single array buffer. |
152 callback DataCallback = void(optional ArrayBuffer data); | 156 callback DataCallback = void(optional ArrayBuffer data); |
153 | 157 |
154 // An empty callback used purely for signalling success vs. failure. | 158 // An empty callback used purely for signalling success vs. failure. |
155 callback EmptyCallback = void(); | 159 callback EmptyCallback = void(); |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 ConnectionInfoCallback callback); | 330 ConnectionInfoCallback callback); |
327 }; | 331 }; |
328 | 332 |
329 interface Events { | 333 interface Events { |
330 // Event fired when the data for the user currently associated with | 334 // Event fired when the data for the user currently associated with |
331 // Easy unlock service is updated. | 335 // Easy unlock service is updated. |
332 // |userInfo| The updated user information. | 336 // |userInfo| The updated user information. |
333 static void onUserInfoUpdated(UserInfo userInfo); | 337 static void onUserInfoUpdated(UserInfo userInfo); |
334 }; | 338 }; |
335 }; | 339 }; |
OLD | NEW |