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

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

Issue 1082383002: [Webapp Refactor] Remove remoting.clientSession. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix browser tests Created 5 years, 8 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 | « remoting/webapp/crd/js/smart_reconnector.js ('k') | remoting/webapp/crd/js/window_frame.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/crd/js/toolbar.js
diff --git a/remoting/webapp/crd/js/toolbar.js b/remoting/webapp/crd/js/toolbar.js
index a06e2e5acfe37eb463ed5ee8d61d013226d1a15c..f1b7692c4bb6a8a87f3f1f02bcd13b1747d43005 100644
--- a/remoting/webapp/crd/js/toolbar.js
+++ b/remoting/webapp/crd/js/toolbar.js
@@ -14,9 +14,11 @@ var remoting = remoting || {};
/**
* @param {HTMLElement} toolbar The HTML element representing the tool-bar.
+ * @param {function()} disconnectCallback Callback for disconnecting the
+ * session.
* @constructor
*/
-remoting.Toolbar = function(toolbar) {
+remoting.Toolbar = function(toolbar, disconnectCallback) {
/** @private {HTMLElement} */
this.toolbar_ = toolbar;
/** @private {HTMLElement} */
@@ -42,8 +44,7 @@ remoting.Toolbar = function(toolbar) {
window.addEventListener('mousemove', remoting.Toolbar.onMouseMove, false);
window.addEventListener('resize', this.center.bind(this), false);
- registerEventListener('toolbar-disconnect', 'click',
- remoting.app.disconnect.bind(remoting.app));
+ registerEventListener('toolbar-disconnect', 'click', disconnectCallback);
registerEventListener('toolbar-stub',
'click', function() { remoting.toolbar.toggle(); });
« no previous file with comments | « remoting/webapp/crd/js/smart_reconnector.js ('k') | remoting/webapp/crd/js/window_frame.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698