diff options
author | jamiewalch@google.com <jamiewalch@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-04 17:15:40 +0000 |
---|---|---|
committer | jamiewalch@google.com <jamiewalch@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-04 17:15:40 +0000 |
commit | eb63d674308842a51494c543565389dd08059c45 (patch) | |
tree | a3f22d244844316a5357d61b5f3aad44b91bb2ce /remoting | |
parent | 86d2b146a8381fbf9aa7e5eb28ea13e28cabd06f (diff) | |
download | chromium_src-eb63d674308842a51494c543565389dd08059c45.zip chromium_src-eb63d674308842a51494c543565389dd08059c45.tar.gz chromium_src-eb63d674308842a51494c543565389dd08059c45.tar.bz2 |
Disable daemon UI if unsupported.
BUG=120805
TEST=Manual
Review URL: https://chromiumcodereview.appspot.com/9950132
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130653 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r-- | remoting/remoting.gyp | 12 | ||||
-rw-r--r-- | remoting/webapp/_locales/en/messages.json | 4 | ||||
-rw-r--r-- | remoting/webapp/daemon_plugin.js | 28 | ||||
-rw-r--r-- | remoting/webapp/main.html | 3 |
4 files changed, 29 insertions, 18 deletions
diff --git a/remoting/remoting.gyp b/remoting/remoting.gyp index db396ff..41469dad 100644 --- a/remoting/remoting.gyp +++ b/remoting/remoting.gyp @@ -615,13 +615,16 @@ { 'action_name': 'Verify Remoting WebApp i18n', 'inputs': [ - 'webapp/verify-webapp.py', + 'host/plugin/host_script_object.cc', 'webapp/_locales/en/messages.json', - 'webapp/main.html', + 'webapp/client_screen.js', + 'webapp/daemon_plugin.js', 'webapp/host_table_entry.js', + 'webapp/host_setup_dialog.js', + 'webapp/main.html', 'webapp/manifest.json', 'webapp/remoting.js', - 'host/plugin/host_script_object.cc', + 'webapp/verify-webapp.py', ], 'outputs': [ '<(PRODUCT_DIR)/remoting/webapp_verified.stamp', @@ -632,9 +635,10 @@ '<(PRODUCT_DIR)/remoting/webapp_verified.stamp', 'webapp/_locales/en/messages.json', 'webapp/client_screen.js', - 'webapp/main.html', + 'webapp/daemon_plugin.js', 'webapp/host_table_entry.js', 'webapp/host_setup_dialog.js', + 'webapp/main.html', 'webapp/manifest.json', 'webapp/remoting.js', 'host/plugin/host_script_object.cc', diff --git a/remoting/webapp/_locales/en/messages.json b/remoting/webapp/_locales/en/messages.json index ecfb612..339f8c8 100644 --- a/remoting/webapp/_locales/en/messages.json +++ b/remoting/webapp/_locales/en/messages.json @@ -206,6 +206,10 @@ "message": "Change PIN", "description": "Hyperlink displayed immediately after the message indicating that the current computer is accepting remote connectins. Clicking this link allows the user to change the PIN (personal identification number) for accessing this host." }, + "HOME_DAEMON_DISABLED_MESSAGE": { + "message": "Sharing this computer for any-time access is not yet supported on this platform\u2026 stay tuned.", + "description": "Message displayed when the current computer is not accepting remote connections, instructing the user how to enable them." + }, "HOME_DAEMON_STOP_BUTTON": { "message": "Disable remote connections", "description": "Button displayed when the current computer is accepting remote connections. Clicking this button causes it to stop accepting remote connections." diff --git a/remoting/webapp/daemon_plugin.js b/remoting/webapp/daemon_plugin.js index 52500a3..812dfc9 100644 --- a/remoting/webapp/daemon_plugin.js +++ b/remoting/webapp/daemon_plugin.js @@ -58,25 +58,27 @@ remoting.DaemonPlugin.prototype.updateDom = function() { // TODO(sergeyu): This code updates UI state. Does it belong here, // or should it moved somewhere else? var match = ''; - switch (this.state()) { + var row = document.getElementById('this-host-connect'); + var state = this.state(); + switch (state) { case remoting.DaemonPlugin.State.STARTED: - match = 'enabled'; + remoting.updateModalUi('enabled', 'data-daemon-state'); + row.classList.remove('host-offline'); + row.classList.add('clickable'); break; + case remoting.DaemonPlugin.State.NOT_IMPLEMENTED: + document.getElementById('start-daemon').disabled = true; + document.getElementById('start-daemon-message').innerText = + chrome.i18n.getMessage( + /*i18n-content*/'HOME_DAEMON_DISABLED_MESSAGE'); + // No break; case remoting.DaemonPlugin.State.STOPPED: case remoting.DaemonPlugin.State.NOT_INSTALLED: - match = 'disabled'; + remoting.updateModalUi('disabled', 'data-daemon-state'); + row.classList.add('host-offline'); + row.classList.remove('clickable'); break; } - remoting.updateModalUi(match, 'data-daemon-state'); - var element = document.getElementById('this-host-connect'); - if (match == 'enabled') { - element.classList.remove('host-offline'); - element.classList.add('clickable'); - } else { - element.classList.add('host-offline'); - element.classList.remove('clickable'); - element.title = ''; - } }; /** diff --git a/remoting/webapp/main.html b/remoting/webapp/main.html index 78dfb51..f8db17c 100644 --- a/remoting/webapp/main.html +++ b/remoting/webapp/main.html @@ -147,7 +147,8 @@ found in the LICENSE file. <img id="this-host-icon" src="icon_host.png" class="host-list-main-icon"> - <div class="box-spacer" + <div class="box-spacer host-list-label" + id="start-daemon-message" i18n-content="HOME_DAEMON_START_MESSAGE" data-daemon-state="disabled"></div> <div id="this-host-name" |