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

Unified Diff: remoting/webapp/crd/js/local_host_section.js

Issue 1020743002: [Chromoting] Move app-specific code out of remoting.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make isMe2MeInstallable private Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/webapp/crd/js/host_setup_dialog.js ('k') | remoting/webapp/crd/js/remoting.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..f0b72118d44d1f59dbdef39cc020eae8347c4595 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,24 @@ 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}
+ * @private
+ */
+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_);
« no previous file with comments | « remoting/webapp/crd/js/host_setup_dialog.js ('k') | remoting/webapp/crd/js/remoting.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698