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

Unified Diff: remoting/webapp/event_handlers.js

Issue 265393005: Implement apps v2 custom window frame. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed file added accidentally. Created 6 years, 7 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
Index: remoting/webapp/event_handlers.js
diff --git a/remoting/webapp/event_handlers.js b/remoting/webapp/event_handlers.js
index bcbc2010ab8823ec82fd493dc930309a1a482d9f..e864c2db3d44418b9c2f0a73c1a92b3df0c69b3a 100644
--- a/remoting/webapp/event_handlers.js
+++ b/remoting/webapp/event_handlers.js
@@ -101,6 +101,12 @@ function onLoad() {
remoting.init();
window.addEventListener('resize', remoting.onResize, 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.
+ remoting.fullscreen.addListener(remoting.onResize);
if (!remoting.isAppsV2) {
window.addEventListener('beforeunload', remoting.promptClose, false);
window.addEventListener('unload', remoting.disconnect, false);

Powered by Google App Engine
This is Rietveld 408576698