Index: remoting/webapp/toolbar.js |
diff --git a/remoting/webapp/toolbar.js b/remoting/webapp/toolbar.js |
index f71bc3d011a363070f60e30ef87c8951108cbb35..56c28a469c5032b95cac3c16bb7030d1e777819e 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); |
@@ -50,9 +60,6 @@ remoting.Toolbar = function(toolbar) { |
function() { |
chrome.app.window.create('main.html', { 'width': 800, 'height': 600 }); |
}); |
- 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(); }); |
@@ -104,6 +111,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. |
* |