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

Unified Diff: remoting/webapp/app_remoting/js/app_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 | « no previous file | remoting/webapp/base/js/application.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/app_remoting/js/app_remoting.js
diff --git a/remoting/webapp/app_remoting/js/app_remoting.js b/remoting/webapp/app_remoting/js/app_remoting.js
index 83493ebf5e370678727c054bb3d800840b2ba9c3..e1efb3ac947857c275f30a424308518a28cf1a8f 100644
--- a/remoting/webapp/app_remoting/js/app_remoting.js
+++ b/remoting/webapp/app_remoting/js/app_remoting.js
@@ -211,18 +211,6 @@ remoting.AppRemoting.prototype.runApplicationUrl = function() {
};
/**
- * @return {string} The default remap keys for the current platform.
- */
-remoting.AppRemoting.prototype.getDefaultRemapKeys = function() {
- // Map Cmd to Ctrl on Mac since hosts typically use Ctrl for keyboard
- // shortcuts, but we want them to act as natively as possible.
- if (remoting.platformIsMac()) {
- return '0x0700e3>0x0700e0,0x0700e7>0x0700e4';
- }
- return '';
-};
-
-/**
* Called when a new session has been connected.
*
* @param {remoting.ConnectionInfo} connectionInfo
@@ -249,8 +237,13 @@ remoting.AppRemoting.prototype.handleConnected = function(connectionInfo) {
// TODO(kelvinp): Move all app remoting specific logic into
// remoting.AppRemotingView.
this.connectedView_ = new remoting.DesktopConnectedView(
- document.getElementById('client-container'), connectionInfo,
- this.getDefaultRemapKeys());
+ document.getElementById('client-container'), connectionInfo);
+
+ // Map Cmd to Ctrl on Mac since hosts typically use Ctrl for keyboard
+ // shortcuts, but we want them to act as natively as possible.
+ if (remoting.platformIsMac()) {
+ connectionInfo.plugin().setRemapKeys('0x0700e3>0x0700e0,0x0700e7>0x0700e4');
+ }
};
/**
« no previous file with comments | « no previous file | remoting/webapp/base/js/application.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698