summaryrefslogtreecommitdiffstats
path: root/remoting/webapp/remoting.js
diff options
context:
space:
mode:
authorwez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-12 03:02:09 +0000
committerwez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-12 03:02:09 +0000
commitda83970eaf43d7b8e369cc1986571607b0e616bf (patch)
tree9629ced139affc64e067108d2b33e08f166e5a86 /remoting/webapp/remoting.js
parent08c3a7ab90c8dbf8d9c00a5d421a5f469844c93f (diff)
downloadchromium_src-da83970eaf43d7b8e369cc1986571607b0e616bf.zip
chromium_src-da83970eaf43d7b8e369cc1986571607b0e616bf.tar.gz
chromium_src-da83970eaf43d7b8e369cc1986571607b0e616bf.tar.bz2
Remap the right Control key to Cmd when running on ChromeOS.
Requires the browser's Chromoting client plugin to support the remapKey API. BUG=105736,121787 TEST=Client running on ChromeOS can copy text on Mac OS X host by pressing right-Ctrl + C. Review URL: http://codereview.chromium.org/10052034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131914 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/webapp/remoting.js')
-rw-r--r--remoting/webapp/remoting.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/remoting/webapp/remoting.js b/remoting/webapp/remoting.js
index b2a08fa..e7836c8 100644
--- a/remoting/webapp/remoting.js
+++ b/remoting/webapp/remoting.js
@@ -165,6 +165,15 @@ remoting.signOut = function() {
};
/**
+ * Returns whether the app is running on ChromeOS.
+ *
+ * @return {boolean} True if the app is running on ChromeOS.
+ */
+remoting.runningOnChromeOS = function() {
+ return !!navigator.userAgent.match(/\bCrOS\b/);
+}
+
+/**
* Callback function called when the browser window gets a paste operation.
*
* @param {Event} eventUncast
@@ -252,7 +261,7 @@ function getAppStartupMode_() {
*/
function isHostModeSupported_() {
// Currently, sharing on Chromebooks is not supported.
- return !navigator.userAgent.match(/\bCrOS\b/);
+ return !remoting.runningOnChromeOS();
}
/**