 Chromium Code Reviews
 Chromium Code Reviews Issue 1020743002:
  [Chromoting] Move app-specific code out of remoting.js  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master
    
  
    Issue 1020743002:
  [Chromoting] Move app-specific code out of remoting.js  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master| OLD | NEW | 
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 var remoting = remoting || {}; | 5 var remoting = remoting || {}; | 
| 6 | 6 | 
| 7 (function() { | 7 (function() { | 
| 8 | 8 | 
| 9 'use strict'; | 9 'use strict'; | 
| 10 | 10 | 
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 100 state === remoting.HostController.State.NOT_INSTALLED) { | 100 state === remoting.HostController.State.NOT_INSTALLED) { | 
| 101 return false; | 101 return false; | 
| 102 } | 102 } | 
| 103 | 103 | 
| 104 // In addition, it cannot be started if there is an error (in many error | 104 // In addition, it cannot be started if there is an error (in many error | 
| 105 // states, the start operation will fail anyway, but even if it succeeds, the | 105 // states, the start operation will fail anyway, but even if it succeeds, the | 
| 106 // chance of a related but hard-to-diagnose future error is high). | 106 // chance of a related but hard-to-diagnose future error is high). | 
| 107 return this.isEnabled_() || !this.hasError_; | 107 return this.isEnabled_() || !this.hasError_; | 
| 108 }; | 108 }; | 
| 109 | 109 | 
| 110 /** | |
| 111 * Returns true if the current platform is fully supported. It's only used when | |
| 112 * we detect that host native messaging components are not installed. In that | |
| 113 * case the result of this function determines if the webapp should show the | |
| 114 * controls that allow to install and enable Me2Me host. | |
| 115 * | |
| 116 * @return {boolean} | |
| 117 */ | |
| 118 remoting.isMe2MeInstallable = function() { | |
| 
garykac
2015/03/19 01:03:44
moved here from remoting.js
 
kelvinp
2015/03/19 17:50:20
It looks like the function is only used here.
Plea
 
garykac
2015/03/19 21:58:38
Done.
 | |
| 119 // The chromoting host is currently not installable on ChromeOS. | |
| 120 // For Linux, we have a install package for Ubuntu but not other distros. | |
| 121 // Since we cannot tell from javascript alone the Linux distro the client is | |
| 122 // on, we don't show the daemon-control UI for Linux unless the host is | |
| 123 // installed. | |
| 124 return remoting.platformIsWindows() || remoting.platformIsMac(); | |
| 125 } | |
| 126 | |
| 110 /** @private */ | 127 /** @private */ | 
| 111 remoting.LocalHostSection.prototype.updateUI_ = function() { | 128 remoting.LocalHostSection.prototype.updateUI_ = function() { | 
| 112 this.hostTableEntry_.setHost(this.host_); | 129 this.hostTableEntry_.setHost(this.host_); | 
| 113 | 130 | 
| 114 // Disable elements. | 131 // Disable elements. | 
| 115 var enabled = this.isEnabled_(); | 132 var enabled = this.isEnabled_(); | 
| 116 var canChangeLocalHostState = this.canChangeState(); | 133 var canChangeLocalHostState = this.canChangeState(); | 
| 117 var daemonState = ''; | 134 var daemonState = ''; | 
| 118 if (!enabled) { | 135 if (!enabled) { | 
| 119 daemonState = 'disabled'; | 136 daemonState = 'disabled'; | 
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 153 this.setupDialog_.showForPin(); | 170 this.setupDialog_.showForPin(); | 
| 154 }; | 171 }; | 
| 155 | 172 | 
| 156 /** @param {remoting.HostTableEntry} host */ | 173 /** @param {remoting.HostTableEntry} host */ | 
| 157 remoting.LocalHostSection.Controller.prototype.rename = function(host) { | 174 remoting.LocalHostSection.Controller.prototype.rename = function(host) { | 
| 158 this.hostList_.renameHost(host); | 175 this.hostList_.renameHost(host); | 
| 159 }; | 176 }; | 
| 160 | 177 | 
| 161 }()); | 178 }()); | 
| 162 | 179 | 
| OLD | NEW |