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

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

Issue 952353002: Requiem for client_screen.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase + Ready for Check-in 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 | « remoting/webapp/crd/js/desktop_connected_view.js ('k') | remoting/webapp/crd/js/fullscreen.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 273ecc5c945cad18afa0633846c691b368f81be7..01da99bd9d099aa2799bb9986b411c2799246919 100644
--- a/remoting/webapp/crd/js/desktop_remoting.js
+++ b/remoting/webapp/crd/js/desktop_remoting.js
@@ -97,17 +97,10 @@ remoting.DesktopRemoting.prototype.init = function() {
remoting.optionsMenu = remoting.toolbar.createOptionsMenu();
window.addEventListener('beforeunload', remoting.promptClose, false);
- window.addEventListener('unload', remoting.disconnect, false);
+ window.addEventListener('unload',
+ remoting.app.disconnect.bind(remoting.app), false);
}
- // When a window goes full-screen, a resize event is triggered, but the
- // Fullscreen.isActive call is not guaranteed to return true until the
- // full-screen event is triggered. In apps v2, the size of the window's
- // client area is calculated differently in full-screen mode, so register
- // for both events.
- window.addEventListener('resize', remoting.onResize, false);
- remoting.fullscreen.addListener(remoting.onResize);
-
remoting.initHostlist_();
var homeFeedback = new remoting.MenuButton(
@@ -233,6 +226,12 @@ remoting.DesktopRemoting.prototype.handleConnected = function(clientSession) {
* @return {void} Nothing.
*/
remoting.DesktopRemoting.prototype.handleDisconnected = function() {
+ 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);
+ }
};
/**
« no previous file with comments | « remoting/webapp/crd/js/desktop_connected_view.js ('k') | remoting/webapp/crd/js/fullscreen.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698