Chromium Code Reviews| 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..6b44543ce04e7129fdc351e3edfa80ce980c0f88 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,9 @@ remoting.OptionsMenu.prototype.onShow = function() { |
| var drApp = /** @type {remoting.DesktopRemoting} */ (remoting.app); |
| var mode = drApp.getConnectionMode(); |
| + remoting.MenuButton.select( |
| + this.mapRightCtrl_, this.desktopConnectedView_.getMapRightCtrl()); |
|
Wez
2015/06/01 19:47:57
Do we want to show this option even on non-ChromeO
Jamie
2015/06/01 19:59:51
I think you're probably right. I was thinking that
Wez
2015/06/02 17:32:56
SGTM
If we're going to make this general purpose
|
| + |
| this.resizeToClient_.hidden = mode === remoting.DesktopRemoting.Mode.IT2ME; |
| remoting.MenuButton.select( |
| this.resizeToClient_, this.desktopConnectedView_.getResizeToClient()); |
| @@ -118,6 +125,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( |