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

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

Issue 160963003: Minor cleanups in UI code that gets host state when webapp is stared (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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_list.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 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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;
OLDNEW
« no previous file with comments | « no previous file | remoting/webapp/host_list.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698