| 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.
|
| *
|
|
|