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

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

Issue 10855182: [Chromoting] The webapp should consider the host being enabled when the serice is starting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | no next file » | 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 this.plugin_.getUsageStatsConsent(callback); 73 this.plugin_.getUsageStatsConsent(callback);
74 }; 74 };
75 75
76 /** 76 /**
77 * Show or hide daemon-specific parts of the UI. 77 * Show or hide daemon-specific parts of the UI.
78 * @return {void} Nothing. 78 * @return {void} Nothing.
79 */ 79 */
80 remoting.HostController.prototype.updateDom = function() { 80 remoting.HostController.prototype.updateDom = function() {
81 var match = ''; 81 var match = '';
82 var state = this.state(); 82 var state = this.state();
83 var enabled = (state == remoting.HostController.State.STARTED); 83 var enabled = (state == remoting.HostController.State.STARTING) ||
84 (state == remoting.HostController.State.STARTED);
84 var supported = (state != remoting.HostController.State.NOT_IMPLEMENTED); 85 var supported = (state != remoting.HostController.State.NOT_IMPLEMENTED);
85 remoting.updateModalUi(enabled ? 'enabled' : 'disabled', 'data-daemon-state'); 86 remoting.updateModalUi(enabled ? 'enabled' : 'disabled', 'data-daemon-state');
86 document.getElementById('daemon-control').hidden = !supported; 87 document.getElementById('daemon-control').hidden = !supported;
87 var element = document.getElementById('host-list-empty-hosting-supported'); 88 var element = document.getElementById('host-list-empty-hosting-supported');
88 element.hidden = !supported; 89 element.hidden = !supported;
89 element = document.getElementById('host-list-empty-hosting-unsupported'); 90 element = document.getElementById('host-list-empty-hosting-unsupported');
90 element.hidden = supported; 91 element.hidden = supported;
91 }; 92 };
92 93
93 /** 94 /**
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 try { 368 try {
368 this.plugin_.getDaemonConfig(onConfig); 369 this.plugin_.getDaemonConfig(onConfig);
369 } catch (err) { 370 } catch (err) {
370 this.setHost(null); 371 this.setHost(null);
371 onDone(); 372 onDone();
372 } 373 }
373 }; 374 };
374 375
375 /** @type {remoting.HostController} */ 376 /** @type {remoting.HostController} */
376 remoting.hostController = null; 377 remoting.hostController = null;
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698