Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(186)

Side by Side Diff: remoting/webapp/host_controller.js

Issue 396063003: Fix HostDaemonFacade to handle the case when NM host is not installed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | remoting/webapp/host_daemon_facade.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 /** @constructor */ 10 /** @constructor */
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 this.hostDaemonFacade_.getDaemonConfig(onConfig, onError); 424 this.hostDaemonFacade_.getDaemonConfig(onConfig, onError);
425 }; 425 };
426 426
427 /** 427 /**
428 * Get the state of the local host. 428 * Get the state of the local host.
429 * 429 *
430 * @param {function(remoting.HostController.State):void} onDone Completion 430 * @param {function(remoting.HostController.State):void} onDone Completion
431 * callback. 431 * callback.
432 */ 432 */
433 remoting.HostController.prototype.getLocalHostState = function(onDone) { 433 remoting.HostController.prototype.getLocalHostState = function(onDone) {
434 this.hostDaemonFacade_.getDaemonState(onDone, function(error) { 434 /** @param {remoting.Error} error */
435 onDone(remoting.HostController.State.UNKNOWN); 435 function onError(error) {
436 }); 436 onDone((error == remoting.Error.MISSING_PLUGIN) ?
437 remoting.HostController.State.NOT_INSTALLED :
438 remoting.HostController.State.UNKNOWN);
439 }
440 this.hostDaemonFacade_.getDaemonState(onDone, onError);
437 }; 441 };
438 442
439 /** 443 /**
440 * Get the id of the local host, or null if it is not registered. 444 * Get the id of the local host, or null if it is not registered.
441 * 445 *
442 * @param {function(string?):void} onDone Completion callback. 446 * @param {function(string?):void} onDone Completion callback.
443 */ 447 */
444 remoting.HostController.prototype.getLocalHostId = function(onDone) { 448 remoting.HostController.prototype.getLocalHostId = function(onDone) {
445 /** @type {remoting.HostController} */ 449 /** @type {remoting.HostController} */
446 var that = this; 450 var that = this;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 * @param {function(remoting.Error):void} onError Error callback. 494 * @param {function(remoting.Error):void} onError Error callback.
491 * @return {void} 495 * @return {void}
492 */ 496 */
493 remoting.HostController.prototype.clearPairedClients = function( 497 remoting.HostController.prototype.clearPairedClients = function(
494 onDone, onError) { 498 onDone, onError) {
495 this.hostDaemonFacade_.clearPairedClients(onDone, onError); 499 this.hostDaemonFacade_.clearPairedClients(onDone, onError);
496 }; 500 };
497 501
498 /** @type {remoting.HostController} */ 502 /** @type {remoting.HostController} */
499 remoting.hostController = null; 503 remoting.hostController = null;
OLDNEW
« no previous file with comments | « no previous file | remoting/webapp/host_daemon_facade.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698