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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 }; | 308 }; |
309 | 309 |
310 /** | 310 /** |
311 * @return {void} Nothing. | 311 * @return {void} Nothing. |
312 * @private | 312 * @private |
313 */ | 313 */ |
314 remoting.HostSetupDialog.prototype.pollDaemonState_ = function() { | 314 remoting.HostSetupDialog.prototype.pollDaemonState_ = function() { |
315 var state = this.daemon_.state(); | 315 var state = this.daemon_.state(); |
316 var retry = false; // Set to true if we haven't finished yet. | 316 var retry = false; // Set to true if we haven't finished yet. |
317 switch (state) { | 317 switch (state) { |
| 318 case remoting.DaemonPlugin.State.NOT_INSTALLED: |
| 319 case remoting.DaemonPlugin.State.INSTALLED: |
318 case remoting.DaemonPlugin.State.STOPPED: | 320 case remoting.DaemonPlugin.State.STOPPED: |
319 case remoting.DaemonPlugin.State.NOT_INSTALLED: | 321 case remoting.DaemonPlugin.State.STARTING: |
320 retry = true; | 322 retry = true; |
321 break; | 323 break; |
322 case remoting.DaemonPlugin.State.STARTED: | 324 case remoting.DaemonPlugin.State.STARTED: |
323 if (this.flow_.getState() == remoting.HostSetupFlow.State.START_HOST || | 325 if (this.flow_.getState() == remoting.HostSetupFlow.State.START_HOST || |
324 this.flow_.getState() == remoting.HostSetupFlow.State.UPDATE_PIN) { | 326 this.flow_.getState() == remoting.HostSetupFlow.State.UPDATE_PIN) { |
325 this.flow_.switchToNextStep(true); | 327 this.flow_.switchToNextStep(true); |
326 this.updateState_(); | 328 this.updateState_(); |
327 } | 329 } |
328 this.daemon_.updateDom(); | 330 this.daemon_.updateDom(); |
329 break; | 331 break; |
(...skipping 12 matching lines...) Expand all Loading... |
342 if (retry) { | 344 if (retry) { |
343 /** @type {remoting.HostSetupDialog} */ | 345 /** @type {remoting.HostSetupDialog} */ |
344 var that = this; | 346 var that = this; |
345 var pollDaemonState = function() { that.pollDaemonState_(); } | 347 var pollDaemonState = function() { that.pollDaemonState_(); } |
346 window.setTimeout(pollDaemonState, 1000); | 348 window.setTimeout(pollDaemonState, 1000); |
347 } | 349 } |
348 }; | 350 }; |
349 | 351 |
350 /** @type {remoting.HostSetupDialog} */ | 352 /** @type {remoting.HostSetupDialog} */ |
351 remoting.hostSetupDialog = null; | 353 remoting.hostSetupDialog = null; |
OLD | NEW |