summaryrefslogtreecommitdiffstats
path: root/remoting/webapp/crd/js/window_frame.js
diff options
context:
space:
mode:
Diffstat (limited to 'remoting/webapp/crd/js/window_frame.js')
-rw-r--r--remoting/webapp/crd/js/window_frame.js13
1 files changed, 4 insertions, 9 deletions
diff --git a/remoting/webapp/crd/js/window_frame.js b/remoting/webapp/crd/js/window_frame.js
index 0bb0b64..65d8afe 100644
--- a/remoting/webapp/crd/js/window_frame.js
+++ b/remoting/webapp/crd/js/window_frame.js
@@ -14,9 +14,11 @@ var remoting = remoting || {};
/**
* @param {HTMLElement} titleBar The root node of the title-bar DOM hierarchy.
+ * @param {function()} disconnectCallback Callback for disconnecting the
+ * session.
* @constructor
*/
-remoting.WindowFrame = function(titleBar) {
+remoting.WindowFrame = function(titleBar, disconnectCallback) {
/** @private {remoting.DesktopConnectedView} */
this.desktopConnectedView_ = null;
@@ -49,7 +51,7 @@ remoting.WindowFrame = function(titleBar) {
* @type {Array<{cls:string, fn: function()}>}
*/
var handlers = [
- { cls: 'window-disconnect', fn: this.disconnectSession_.bind(this) },
+ { cls: 'window-disconnect', fn: disconnectCallback },
{ cls: 'window-maximize-restore',
fn: this.maximizeOrRestoreWindow_.bind(this) },
{ cls: 'window-minimize', fn: this.minimizeWindow_.bind(this) },
@@ -127,13 +129,6 @@ remoting.WindowFrame.prototype.getClientArea = function() {
/**
* @private
*/
-remoting.WindowFrame.prototype.disconnectSession_ = function() {
- remoting.app.disconnect();
-};
-
-/**
- * @private
- */
remoting.WindowFrame.prototype.maximizeOrRestoreWindow_ = function() {
/** @type {boolean} */
var restore =