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

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

Issue 10703034: Remove 'Enable' button on unsupported platforms. Added 'No hosts' message. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reviewer comments. Created 8 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
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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 switch (state) { 83 switch (state) {
84 case remoting.HostController.State.STARTED: 84 case remoting.HostController.State.STARTED:
85 remoting.updateModalUi('enabled', 'data-daemon-state'); 85 remoting.updateModalUi('enabled', 'data-daemon-state');
86 break; 86 break;
87 case remoting.HostController.State.NOT_IMPLEMENTED: 87 case remoting.HostController.State.NOT_IMPLEMENTED:
88 document.getElementById('start-daemon').disabled = true; 88 document.getElementById('daemon-control').hidden = true;
89 document.getElementById('start-daemon-message').innerText = 89 break;
90 chrome.i18n.getMessage(
91 /*i18n-content*/'HOME_DAEMON_DISABLED_MESSAGE');
92 // No break;
93 case remoting.HostController.State.STOPPED: 90 case remoting.HostController.State.STOPPED:
94 case remoting.HostController.State.NOT_INSTALLED: 91 case remoting.HostController.State.NOT_INSTALLED:
95 remoting.updateModalUi('disabled', 'data-daemon-state'); 92 remoting.updateModalUi('disabled', 'data-daemon-state');
96 break; 93 break;
97 } 94 }
98 }; 95 };
99 96
100 /** 97 /**
101 * Set tool-tips for the 'connect' action. We can't just set this on the 98 * Set tool-tips for the 'connect' action. We can't just set this on the
102 * parent element because the button has no tool-tip, and therefore would 99 * parent element because the button has no tool-tip, and therefore would
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 try { 369 try {
373 this.plugin_.getDaemonConfig(onConfig); 370 this.plugin_.getDaemonConfig(onConfig);
374 } catch (err) { 371 } catch (err) {
375 this.setHost(null); 372 this.setHost(null);
376 onDone(); 373 onDone();
377 } 374 }
378 }; 375 };
379 376
380 /** @type {remoting.HostController} */ 377 /** @type {remoting.HostController} */
381 remoting.hostController = null; 378 remoting.hostController = null;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698