| 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 /** | 5 /** |
| 6 * @fileoverview Implements an enroll handler using USB gnubbies. | 6 * @fileoverview Implements an enroll handler using USB gnubbies. |
| 7 */ | 7 */ |
| 8 'use strict'; | 8 'use strict'; |
| 9 | 9 |
| 10 /** | 10 /** |
| 11 * @param {!EnrollHelperRequest} request The enroll request. | 11 * @param {!EnrollHelperRequest} request The enroll request. |
| 12 * @constructor | 12 * @constructor |
| 13 * @implements {RequestHandler} | 13 * @implements {RequestHandler} |
| 14 */ | 14 */ |
| 15 function UsbEnrollHandler(request) { | 15 function UsbEnrollHandler(request) { |
| 16 /** @private {!EnrollHelperRequest} */ | 16 /** @private {!EnrollHelperRequest} */ |
| 17 this.request_ = request; | 17 this.request_ = request; |
| 18 | 18 |
| 19 /** @private {Array.<Gnubby>} */ | 19 /** @private {Array<Gnubby>} */ |
| 20 this.waitingForTouchGnubbies_ = []; | 20 this.waitingForTouchGnubbies_ = []; |
| 21 | 21 |
| 22 /** @private {boolean} */ | 22 /** @private {boolean} */ |
| 23 this.closed_ = false; | 23 this.closed_ = false; |
| 24 /** @private {boolean} */ | 24 /** @private {boolean} */ |
| 25 this.notified_ = false; | 25 this.notified_ = false; |
| 26 } | 26 } |
| 27 | 27 |
| 28 /** | 28 /** |
| 29 * Default timeout value in case the caller never provides a valid timeout. | 29 * Default timeout value in case the caller never provides a valid timeout. |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 this.notified_ = true; | 329 this.notified_ = true; |
| 330 this.close(); | 330 this.close(); |
| 331 var reply = { | 331 var reply = { |
| 332 'type': 'enroll_helper_reply', | 332 'type': 'enroll_helper_reply', |
| 333 'code': DeviceStatusCodes.OK_STATUS, | 333 'code': DeviceStatusCodes.OK_STATUS, |
| 334 'version': version, | 334 'version': version, |
| 335 'enrollData': info | 335 'enrollData': info |
| 336 }; | 336 }; |
| 337 this.cb_(reply); | 337 this.cb_(reply); |
| 338 }; | 338 }; |
| OLD | NEW |