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

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

Issue 1153923007: Add a menu option for the right-hand Ctrl -> Meta mapping. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and deepCopy. Created 5 years, 6 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
Index: remoting/webapp/crd/js/options_menu.js
diff --git a/remoting/webapp/crd/js/options_menu.js b/remoting/webapp/crd/js/options_menu.js
index 6c855a8c55d6ee253f4e250dfebeb3fcac2e3103..705af5a2037b9c97e9a5682662d0fb134f52d329 100644
--- a/remoting/webapp/crd/js/options_menu.js
+++ b/remoting/webapp/crd/js/options_menu.js
@@ -15,6 +15,7 @@ var remoting = remoting || {};
/**
* @param {Element} sendCtrlAltDel
* @param {Element} sendPrtScrn
+ * @param {Element} mapRightCtrl
* @param {Element} resizeToClient
* @param {Element} shrinkToFit
* @param {Element} newConnection
@@ -23,12 +24,13 @@ var remoting = remoting || {};
* @param {Element?} startStopRecording
* @constructor
*/
-remoting.OptionsMenu = function(sendCtrlAltDel, sendPrtScrn,
+remoting.OptionsMenu = function(sendCtrlAltDel, sendPrtScrn, mapRightCtrl,
resizeToClient, shrinkToFit,
newConnection, fullscreen, toggleStats,
startStopRecording) {
this.sendCtrlAltDel_ = sendCtrlAltDel;
this.sendPrtScrn_ = sendPrtScrn;
+ this.mapRightCtrl_ = mapRightCtrl;
this.resizeToClient_ = resizeToClient;
this.shrinkToFit_ = shrinkToFit;
this.newConnection_ = newConnection;
@@ -43,6 +45,8 @@ remoting.OptionsMenu = function(sendCtrlAltDel, sendPrtScrn,
'click', this.onSendCtrlAltDel_.bind(this), false);
this.sendPrtScrn_.addEventListener(
'click', this.onSendPrtScrn_.bind(this), false);
+ this.mapRightCtrl_.addEventListener(
+ 'click', this.onMapRightCtrl_.bind(this), false);
this.resizeToClient_.addEventListener(
'click', this.onResizeToClient_.bind(this), false);
this.shrinkToFit_.addEventListener(
@@ -78,6 +82,10 @@ remoting.OptionsMenu.prototype.onShow = function() {
var drApp = /** @type {remoting.DesktopRemoting} */ (remoting.app);
var mode = drApp.getConnectionMode();
+ this.mapRightCtrl_.hidden = !remoting.platformIsChromeOS();
+ remoting.MenuButton.select(
+ this.mapRightCtrl_, this.desktopConnectedView_.getMapRightCtrl());
+
this.resizeToClient_.hidden = mode === remoting.DesktopRemoting.Mode.IT2ME;
remoting.MenuButton.select(
this.resizeToClient_, this.desktopConnectedView_.getResizeToClient());
@@ -118,6 +126,13 @@ remoting.OptionsMenu.prototype.onSendPrtScrn_ = function() {
}
};
+remoting.OptionsMenu.prototype.onMapRightCtrl_ = function() {
+ if (this.desktopConnectedView_) {
+ this.desktopConnectedView_.setMapRightCtrl(
+ !this.desktopConnectedView_.getMapRightCtrl());
+ }
+};
+
remoting.OptionsMenu.prototype.onResizeToClient_ = function() {
if (this.desktopConnectedView_) {
this.desktopConnectedView_.setScreenMode(

Powered by Google App Engine
This is Rietveld 408576698