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

Unified Diff: remoting/webapp/crd/js/window_frame.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/toolbar.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/crd/js/window_frame.js
diff --git a/remoting/webapp/crd/js/window_frame.js b/remoting/webapp/crd/js/window_frame.js
index 0bb0b6475823cb1518d3b17c2ccc32e213b63771..65d8afe842649598ecb48e1117e4b50b5856ae19 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 =
« no previous file with comments | « remoting/webapp/crd/js/toolbar.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698