| 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 /** |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 that.updateState_(); | 365 that.updateState_(); |
| 366 } | 366 } |
| 367 | 367 |
| 368 /** @param {remoting.HostController.State} state */ | 368 /** @param {remoting.HostController.State} state */ |
| 369 var onHostState = function(state) { | 369 var onHostState = function(state) { |
| 370 // Verify if the host has been installed. If not then try to prompt the user | 370 // Verify if the host has been installed. If not then try to prompt the user |
| 371 // again. | 371 // again. |
| 372 var installed = | 372 var installed = |
| 373 state != remoting.HostController.State.NOT_INSTALLED && | 373 state != remoting.HostController.State.NOT_INSTALLED && |
| 374 state != remoting.HostController.State.INSTALLING; | 374 state != remoting.HostController.State.INSTALLING; |
| 375 if (installed) { | 375 |
| 376 // On Windows we perform the host installation after showing the pin form. |
| 377 if (installed || navigator.platform == 'Win32') { |
| 376 that.flow_.switchToNextStep(); | 378 that.flow_.switchToNextStep(); |
| 377 that.updateState_(); | 379 that.updateState_(); |
| 378 } else { | 380 } else { |
| 379 hostInstallDialog.tryAgain(); | 381 hostInstallDialog.tryAgain(); |
| 380 } | 382 } |
| 381 } | 383 } |
| 382 | 384 |
| 383 /** @type {remoting.HostInstallDialog} */ | 385 /** @type {remoting.HostInstallDialog} */ |
| 384 var hostInstallDialog = new remoting.HostInstallDialog(); | 386 var hostInstallDialog = new remoting.HostInstallDialog(); |
| 385 hostInstallDialog.show(onDone, onError); | 387 hostInstallDialog.show(onDone, onError); |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 558 var c = pin.charAt(i); | 560 var c = pin.charAt(i); |
| 559 if ((c < '0') || (c > '9')) { | 561 if ((c < '0') || (c > '9')) { |
| 560 return false; | 562 return false; |
| 561 } | 563 } |
| 562 } | 564 } |
| 563 return true; | 565 return true; |
| 564 }; | 566 }; |
| 565 | 567 |
| 566 /** @type {remoting.HostSetupDialog} */ | 568 /** @type {remoting.HostSetupDialog} */ |
| 567 remoting.hostSetupDialog = null; | 569 remoting.hostSetupDialog = null; |
| OLD | NEW |