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

Unified Diff: remoting/webapp/app_remoting/js/app_remoting.js

Issue 1016623002: [Webapp Refactor] Reparent the ConnectedView into the delegate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing Created 5 years, 9 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 | « no previous file | remoting/webapp/browser_test/browser_test.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/app_remoting/js/app_remoting.js
diff --git a/remoting/webapp/app_remoting/js/app_remoting.js b/remoting/webapp/app_remoting/js/app_remoting.js
index 03d54683e2952a53c32adc98ef46bb4cfa387c55..83493ebf5e370678727c054bb3d800840b2ba9c3 100644
--- a/remoting/webapp/app_remoting/js/app_remoting.js
+++ b/remoting/webapp/app_remoting/js/app_remoting.js
@@ -31,8 +31,11 @@ remoting.AppRemoting = function(app) {
/** @private {remoting.WindowActivationMenu} */
this.windowActivationMenu_ = null;
- /** @private {base.RepeatingTimer} */
- this.pingTimer_ = null;
+ /** @private {base.RepeatingTimer} */
+ this.pingTimer_ = null;
+
+ /** @private {remoting.DesktopConnectedView} */
+ this.connectedView_ = null;
};
/**
@@ -242,6 +245,12 @@ remoting.AppRemoting.prototype.handleConnected = function(connectionInfo) {
var message = { timestamp: new Date().getTime() };
clientSession.sendClientMessage('pingRequest', JSON.stringify(message));
}, CONNECTION_SPEED_PING_INTERVAL);
+
+ // TODO(kelvinp): Move all app remoting specific logic into
+ // remoting.AppRemotingView.
+ this.connectedView_ = new remoting.DesktopConnectedView(
+ document.getElementById('client-container'), connectionInfo,
+ this.getDefaultRemapKeys());
};
/**
@@ -254,6 +263,9 @@ remoting.AppRemoting.prototype.handleDisconnected = function() {
base.dispose(this.pingTimer_);
this.pingTimer_ = null;
+ base.dispose(this.connectedView_);
+ this.connectedView_ = null;
+
chrome.app.window.current().close();
};
« no previous file with comments | « no previous file | remoting/webapp/browser_test/browser_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698