diff options
author | jamiewalch@chromium.org <jamiewalch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-25 04:58:42 +0000 |
---|---|---|
committer | jamiewalch@chromium.org <jamiewalch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-25 04:58:42 +0000 |
commit | ddd417e09acc4c57fc1c726368cf07571f81d75b (patch) | |
tree | ad75b18c891d7c497374d9bba147a29ed4014b11 /remoting/webapp/toolbar.js | |
parent | c2dac535dea5647736dec19201d34ea339fcd109 (diff) | |
download | chromium_src-ddd417e09acc4c57fc1c726368cf07571f81d75b.zip chromium_src-ddd417e09acc4c57fc1c726368cf07571f81d75b.tar.gz chromium_src-ddd417e09acc4c57fc1c726368cf07571f81d75b.tar.bz2 |
This is identical to https://codereview.chromium.org/336293003, which was reverted due to a build failure that I believe was a flake (http://build.chromium.org/p/chromium/builders/Mac/builds/27386/steps/compile/logs/stdio). I'm retrying now that I have a full set of green trybot runs.
TBR=garykac
Review URL: https://codereview.chromium.org/338293005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@279594 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/webapp/toolbar.js')
-rw-r--r-- | remoting/webapp/toolbar.js | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/remoting/webapp/toolbar.js b/remoting/webapp/toolbar.js index 23cbd32..32dfdf6 100644 --- a/remoting/webapp/toolbar.js +++ b/remoting/webapp/toolbar.js @@ -42,6 +42,16 @@ remoting.Toolbar = function(toolbar) { * @private */ this.stubRight_ = 0; + /** + * @type {remoting.OptionsMenu} + * @private + */ + this.optionsMenu_ = new remoting.OptionsMenu( + document.getElementById('send-ctrl-alt-del'), + document.getElementById('send-print-screen'), + document.getElementById('screen-resize-to-client'), + document.getElementById('screen-shrink-to-fit'), + document.getElementById('toggle-full-screen')); window.addEventListener('mousemove', remoting.Toolbar.onMouseMove, false); window.addEventListener('resize', this.center.bind(this), false); @@ -54,9 +64,6 @@ remoting.Toolbar = function(toolbar) { 'frame': "none" }); }); - registerEventListener('send-ctrl-alt-del', 'click', remoting.sendCtrlAltDel); - registerEventListener('send-print-screen', 'click', remoting.sendPrintScreen); - registerEventListener('sign-out', 'click', remoting.signOut); registerEventListener('toolbar-disconnect', 'click', remoting.disconnect); registerEventListener('toolbar-stub', 'click', function() { remoting.toolbar.toggle(); }); @@ -108,6 +115,16 @@ remoting.Toolbar.prototype.toggle = function() { }; /** + * @param {remoting.ClientSession} clientSession The active session, or null if + * there is no connection. + */ +remoting.Toolbar.prototype.setClientSession = function(clientSession) { + this.optionsMenu_.setClientSession(clientSession); + var connectedTo = document.getElementById('connected-to'); + connectedTo.innerText = clientSession.getHostDisplayName(); +}; + +/** * Test the specified co-ordinate to see if it is close enough to the stub * to activate it. * |