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 /** @constructor */ | 10 /** @constructor */ |
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 this.hostDispatcher_.getDaemonConfig(onConfig, onError); | 399 this.hostDispatcher_.getDaemonConfig(onConfig, onError); |
400 }; | 400 }; |
401 | 401 |
402 /** | 402 /** |
403 * Get the state of the local host. | 403 * Get the state of the local host. |
404 * | 404 * |
405 * @param {function(remoting.HostController.State):void} onDone Completion | 405 * @param {function(remoting.HostController.State):void} onDone Completion |
406 * callback. | 406 * callback. |
407 */ | 407 */ |
408 remoting.HostController.prototype.getLocalHostState = function(onDone) { | 408 remoting.HostController.prototype.getLocalHostState = function(onDone) { |
409 this.hostDispatcher_.getDaemonState(onDone, function() { | 409 this.hostDispatcher_.getDaemonState(onDone, function(error) { |
410 onDone(remoting.HostController.State.NOT_IMPLEMENTED); | 410 onDone(remoting.isMe2MeInstallable() |
| 411 ? remoting.HostController.State.NOT_INSTALLED |
| 412 : remoting.HostController.State.NOT_IMPLEMENTED); |
411 }); | 413 }); |
412 }; | 414 }; |
413 | 415 |
414 /** | 416 /** |
415 * Get the id of the local host, or null if it is not registered. | 417 * Get the id of the local host, or null if it is not registered. |
416 * | 418 * |
417 * @param {function(string?):void} onDone Completion callback. | 419 * @param {function(string?):void} onDone Completion callback. |
418 */ | 420 */ |
419 remoting.HostController.prototype.getLocalHostId = function(onDone) { | 421 remoting.HostController.prototype.getLocalHostId = function(onDone) { |
420 /** @type {remoting.HostController} */ | 422 /** @type {remoting.HostController} */ |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 /** | 475 /** |
474 * Returns true if the NPAPI plugin is being used. | 476 * Returns true if the NPAPI plugin is being used. |
475 * @return {boolean} | 477 * @return {boolean} |
476 */ | 478 */ |
477 remoting.HostController.prototype.usingNpapiPlugin = function() { | 479 remoting.HostController.prototype.usingNpapiPlugin = function() { |
478 return this.hostDispatcher_.usingNpapiPlugin(); | 480 return this.hostDispatcher_.usingNpapiPlugin(); |
479 } | 481 } |
480 | 482 |
481 /** @type {remoting.HostController} */ | 483 /** @type {remoting.HostController} */ |
482 remoting.hostController = null; | 484 remoting.hostController = null; |
OLD | NEW |