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

Unified Diff: remoting/webapp/crd/js/desktop_remoting.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/client_plugin_impl.js ('k') | remoting/webapp/crd/js/desktop_remoting_activity.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/crd/js/desktop_remoting.js
diff --git a/remoting/webapp/crd/js/desktop_remoting.js b/remoting/webapp/crd/js/desktop_remoting.js
index 29c32a00e65f6ddb85ff122cee0ac3bea8810ae1..a8b1cf2858d2cedb51c3ea4a589e4ae8d176fd64 100644
--- a/remoting/webapp/crd/js/desktop_remoting.js
+++ b/remoting/webapp/crd/js/desktop_remoting.js
@@ -49,7 +49,7 @@ remoting.DesktopRemoting.prototype.initApplication_ = function() {
if (base.isAppsV2()) {
remoting.windowFrame = new remoting.WindowFrame(
- document.getElementById('title-bar'));
+ document.getElementById('title-bar'), this.disconnect_.bind(this));
remoting.optionsMenu = remoting.windowFrame.createOptionsMenu();
var START_FULLSCREEN = 'start-fullscreen';
@@ -73,13 +73,13 @@ remoting.DesktopRemoting.prototype.initApplication_ = function() {
} else {
remoting.fullscreen = new remoting.FullscreenAppsV1();
remoting.toolbar = new remoting.Toolbar(
- document.getElementById('session-toolbar'));
+ document.getElementById('session-toolbar'),
+ this.disconnect_.bind(this));
remoting.optionsMenu = remoting.toolbar.createOptionsMenu();
window.addEventListener('beforeunload',
this.promptClose_.bind(this), false);
- window.addEventListener('unload',
- remoting.app.disconnect.bind(remoting.app), false);
+ window.addEventListener('unload', this.disconnect_.bind(this), false);
}
remoting.initHostlist_(this.connectMe2Me_.bind(this));
@@ -189,6 +189,16 @@ remoting.DesktopRemoting.prototype.getConnectedViewForTesting = function() {
return activity.getDesktopActivity().getConnectedView();
};
+remoting.DesktopRemoting.prototype.getActivity = function() {
+ return this.activity_;
+};
+
+remoting.DesktopRemoting.prototype.disconnect_ = function() {
+ if (this.activity_) {
+ this.activity_.stop();
+ }
+};
+
/**
* Entry-point for Me2Me connections.
*
« no previous file with comments | « remoting/webapp/crd/js/client_plugin_impl.js ('k') | remoting/webapp/crd/js/desktop_remoting_activity.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698