| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 'use strict'; | 5 'use strict'; |
| 6 | 6 |
| 7 /** @suppress {duplicate} */ | 7 /** @suppress {duplicate} */ |
| 8 var remoting = remoting || {}; | 8 var remoting = remoting || {}; |
| 9 | 9 |
| 10 /** | 10 /** |
| 11 * @param {Array.<remoting.HostSetupFlow.State>} sequence Sequence of | 11 * @param {Array<remoting.HostSetupFlow.State>} sequence Sequence of |
| 12 * steps for the flow. | 12 * steps for the flow. |
| 13 * @constructor | 13 * @constructor |
| 14 */ | 14 */ |
| 15 remoting.HostSetupFlow = function(sequence) { | 15 remoting.HostSetupFlow = function(sequence) { |
| 16 this.sequence_ = sequence; | 16 this.sequence_ = sequence; |
| 17 this.currentStep_ = 0; | 17 this.currentStep_ = 0; |
| 18 this.state_ = sequence[0]; | 18 this.state_ = sequence[0]; |
| 19 this.pin = ''; | 19 this.pin = ''; |
| 20 this.consent = false; | 20 this.consent = false; |
| 21 }; | 21 }; |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 | 266 |
| 267 /** | 267 /** |
| 268 * @return {void} Nothing. | 268 * @return {void} Nothing. |
| 269 */ | 269 */ |
| 270 remoting.HostSetupDialog.prototype.hide = function() { | 270 remoting.HostSetupDialog.prototype.hide = function() { |
| 271 remoting.setMode(remoting.AppMode.HOME); | 271 remoting.setMode(remoting.AppMode.HOME); |
| 272 }; | 272 }; |
| 273 | 273 |
| 274 /** | 274 /** |
| 275 * Starts new flow with the specified sequence of steps. | 275 * Starts new flow with the specified sequence of steps. |
| 276 * @param {Array.<remoting.HostSetupFlow.State>} sequence Sequence of steps. | 276 * @param {Array<remoting.HostSetupFlow.State>} sequence Sequence of steps. |
| 277 * @private | 277 * @private |
| 278 */ | 278 */ |
| 279 remoting.HostSetupDialog.prototype.startNewFlow_ = function(sequence) { | 279 remoting.HostSetupDialog.prototype.startNewFlow_ = function(sequence) { |
| 280 this.flow_ = new remoting.HostSetupFlow(sequence); | 280 this.flow_ = new remoting.HostSetupFlow(sequence); |
| 281 this.pinEntry_.value = ''; | 281 this.pinEntry_.value = ''; |
| 282 this.pinConfirm_.value = ''; | 282 this.pinConfirm_.value = ''; |
| 283 this.pinErrorDiv_.hidden = true; | 283 this.pinErrorDiv_.hidden = true; |
| 284 this.updateState_(); | 284 this.updateState_(); |
| 285 }; | 285 }; |
| 286 | 286 |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 562 var c = pin.charAt(i); | 562 var c = pin.charAt(i); |
| 563 if ((c < '0') || (c > '9')) { | 563 if ((c < '0') || (c > '9')) { |
| 564 return false; | 564 return false; |
| 565 } | 565 } |
| 566 } | 566 } |
| 567 return true; | 567 return true; |
| 568 }; | 568 }; |
| 569 | 569 |
| 570 /** @type {remoting.HostSetupDialog} */ | 570 /** @type {remoting.HostSetupDialog} */ |
| 571 remoting.hostSetupDialog = null; | 571 remoting.hostSetupDialog = null; |
| OLD | NEW |