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

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

Issue 159753008: Disable Me2Me host controls on unsupported Linux systems. (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 | « remoting/tools/me2me_virtual_host.py ('k') | 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 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * Class representing the host-list portion of the home screen UI. 7 * Class representing the host-list portion of the home screen UI.
8 */ 8 */
9 9
10 'use strict'; 10 'use strict';
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 299
300 // The local host cannot be stopped or started if the host controller is not 300 // The local host cannot be stopped or started if the host controller is not
301 // implemented for this platform. Additionally, it cannot be started if there 301 // implemented for this platform. Additionally, it cannot be started if there
302 // is an error (in many error states, the start operation will fail anyway, 302 // is an error (in many error states, the start operation will fail anyway,
303 // but even if it succeeds, the chance of a related but hard-to-diagnose 303 // but even if it succeeds, the chance of a related but hard-to-diagnose
304 // future error is high). 304 // future error is high).
305 var state = this.localHostState_; 305 var state = this.localHostState_;
306 var enabled = (state == remoting.HostController.State.STARTING) || 306 var enabled = (state == remoting.HostController.State.STARTING) ||
307 (state == remoting.HostController.State.STARTED); 307 (state == remoting.HostController.State.STARTED);
308 var canChangeLocalHostState = 308 var canChangeLocalHostState =
309 (state != remoting.HostController.State.NOT_IMPLEMENTED) && 309 (state != remoting.HostController.State.NOT_IMPLEMENTED &&
310 state != remoting.HostController.State.UNKNOWN) &&
310 (enabled || this.lastError_ == ''); 311 (enabled || this.lastError_ == '');
311 312
312 remoting.updateModalUi(enabled ? 'enabled' : 'disabled', 'data-daemon-state'); 313 remoting.updateModalUi(enabled ? 'enabled' : 'disabled', 'data-daemon-state');
313 var element = document.getElementById('daemon-control'); 314 var element = document.getElementById('daemon-control');
314 element.hidden = !canChangeLocalHostState; 315 element.hidden = !canChangeLocalHostState;
315 element = document.getElementById('host-list-empty-hosting-supported'); 316 element = document.getElementById('host-list-empty-hosting-supported');
316 element.hidden = !canChangeLocalHostState; 317 element.hidden = !canChangeLocalHostState;
317 element = document.getElementById('host-list-empty-hosting-unsupported'); 318 element = document.getElementById('host-list-empty-hosting-unsupported');
318 element.hidden = canChangeLocalHostState; 319 element.hidden = canChangeLocalHostState;
319 }; 320 };
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 chrome.storage.local.set(items); 511 chrome.storage.local.set(items);
511 }; 512 };
512 513
513 /** 514 /**
514 * Key name under which Me2Me hosts are cached. 515 * Key name under which Me2Me hosts are cached.
515 */ 516 */
516 remoting.HostList.HOSTS_KEY = 'me2me-cached-hosts'; 517 remoting.HostList.HOSTS_KEY = 'me2me-cached-hosts';
517 518
518 /** @type {remoting.HostList} */ 519 /** @type {remoting.HostList} */
519 remoting.hostList = null; 520 remoting.hostList = null;
OLDNEW
« no previous file with comments | « remoting/tools/me2me_virtual_host.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698