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

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

Issue 1022473004: [Webapp Refactor] Move key injection logic into the plugin layer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removes mismatched privates 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/desktop_connected_view.js ('k') | remoting/webapp/crd/js/session_connector.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/crd/js/desktop_remoting.js
diff --git a/remoting/webapp/crd/js/desktop_remoting.js b/remoting/webapp/crd/js/desktop_remoting.js
index 9b7e24e88c0d786b7e08e8f90d8c2a0c83f2a31e..0f727f0855fbd30337148c58f0178cbc570dcb03 100644
--- a/remoting/webapp/crd/js/desktop_remoting.js
+++ b/remoting/webapp/crd/js/desktop_remoting.js
@@ -156,19 +156,6 @@ remoting.DesktopRemoting.prototype.getApplicationName = function() {
};
/**
- * @return {string} The default remap keys for the current platform.
- */
-remoting.DesktopRemoting.prototype.getDefaultRemapKeys = function() {
- var remapKeys = '';
- // By default, under ChromeOS, remap the right Control key to the right
- // Win / Cmd key.
- if (remoting.platformIsChromeOS()) {
- remapKeys = '0x0700e4>0x0700e7';
- }
- return remapKeys;
-};
-
-/**
* Called when a new session has been connected.
*
* @param {remoting.ConnectionInfo} connectionInfo
@@ -198,8 +185,13 @@ remoting.DesktopRemoting.prototype.handleConnected = function(connectionInfo) {
}
this.connectedView_ = new remoting.DesktopConnectedView(
- document.getElementById('client-container'), connectionInfo,
- this.getDefaultRemapKeys());
+ document.getElementById('client-container'), connectionInfo);
+
+ // By default, under ChromeOS, remap the right Control key to the right
+ // Win / Cmd key.
+ if (remoting.platformIsChromeOS()) {
+ connectionInfo.plugin().setRemapKeys('0x0700e4>0x0700e7');
+ }
if (connectionInfo.mode() === remoting.DesktopConnectedView.Mode.ME2ME) {
var sessionConnector = remoting.app.getSessionConnector();
« no previous file with comments | « remoting/webapp/crd/js/desktop_connected_view.js ('k') | remoting/webapp/crd/js/session_connector.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698