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

Unified Diff: remoting/webapp/crd/js/client_screen.js

Issue 942933002: Fix cannot disconnect remoting session. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/crd/js/client_screen.js
diff --git a/remoting/webapp/crd/js/client_screen.js b/remoting/webapp/crd/js/client_screen.js
index 1dc46fd6fb70a8aba9dd2de8de4693ba238909e4..1700c705177609e867d6c0f9ca5d673dd66512c8 100644
--- a/remoting/webapp/crd/js/client_screen.js
+++ b/remoting/webapp/crd/js/client_screen.js
@@ -53,18 +53,10 @@ remoting.onVisibilityChanged = function() {
* @return {void} Nothing.
*/
remoting.disconnect = function() {
- if (!remoting.desktopConnectedView) {
+ if (!remoting.clientSession) {
return;
}
- if (remoting.desktopConnectedView.getMode() ==
- remoting.DesktopConnectedView.Mode.IT2ME) {
- remoting.setMode(remoting.AppMode.CLIENT_SESSION_FINISHED_IT2ME);
- } else {
- remoting.setMode(remoting.AppMode.CLIENT_SESSION_FINISHED_ME2ME);
- }
- remoting.app.onDisconnected();
- remoting.clientSession = null;
- remoting.desktopConnectedView = null;
+ remoting.clientSession.disconnect(remoting.Error.NONE);
console.log('Disconnected.');
};
@@ -111,6 +103,7 @@ function onClientStateChange_(state) {
onClientStateChange_);
remoting.clientSession.cleanup();
remoting.clientSession = null;
+ remoting.desktopConnectedView = null;
}
/**
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698