Chromium Code Reviews| Index: remoting/webapp/crd/js/local_host_section.js |
| diff --git a/remoting/webapp/crd/js/local_host_section.js b/remoting/webapp/crd/js/local_host_section.js |
| index 50bebe7cf0420732084034244565d0af5614b3b6..5e9bafb86d6655a9d35b48e51d26389666e6d6dc 100644 |
| --- a/remoting/webapp/crd/js/local_host_section.js |
| +++ b/remoting/webapp/crd/js/local_host_section.js |
| @@ -96,7 +96,7 @@ remoting.LocalHostSection.prototype.canChangeState = function() { |
| // Return false if the host is uninstallable. The NOT_INSTALLED check is |
| // required to handle the special case for Ubuntu, as we report the host as |
| // uninstallable on Linux. |
| - if (!remoting.isMe2MeInstallable() && |
| + if (!this.isMe2MeInstallable() && |
| state === remoting.HostController.State.NOT_INSTALLED) { |
| return false; |
| } |
| @@ -107,6 +107,23 @@ remoting.LocalHostSection.prototype.canChangeState = function() { |
| return this.isEnabled_() || !this.hasError_; |
| }; |
| +/** |
| + * Returns true if the current platform is fully supported. It's only used when |
| + * we detect that host native messaging components are not installed. In that |
| + * case the result of this function determines if the webapp should show the |
| + * controls that allow to install and enable Me2Me host. |
| + * |
| + * @return {boolean} |
|
kelvinp
2015/03/19 23:25:20
Make private please.
garykac
2015/03/19 23:49:06
Done.
|
| + */ |
| +remoting.LocalHostSection.prototype.isMe2MeInstallable = function() { |
| + // The chromoting host is currently not installable on ChromeOS. |
| + // For Linux, we have a install package for Ubuntu but not other distros. |
| + // Since we cannot tell from javascript alone the Linux distro the client is |
| + // on, we don't show the daemon-control UI for Linux unless the host is |
| + // installed. |
| + return remoting.platformIsWindows() || remoting.platformIsMac(); |
| +} |
| + |
| /** @private */ |
| remoting.LocalHostSection.prototype.updateUI_ = function() { |
| this.hostTableEntry_.setHost(this.host_); |