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

Unified Diff: remoting/webapp/fullscreen_v2.js

Issue 398403002: Check isActive in onRestore to work-around crbug.com/394819. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reviewer feedback. Created 6 years, 5 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 | remoting/webapp/window_frame.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/fullscreen_v2.js
diff --git a/remoting/webapp/fullscreen_v2.js b/remoting/webapp/fullscreen_v2.js
index 3aaaab16f3006b4543de81343e387385df7bea85..6f6080d1b0830c3317ece143c8e5b8c5e1a6172b 100644
--- a/remoting/webapp/fullscreen_v2.js
+++ b/remoting/webapp/fullscreen_v2.js
@@ -94,6 +94,7 @@ remoting.FullscreenAppsV2.prototype.removeListener = function(callback) {
remoting.FullscreenAppsV2.prototype.syncWithMaximize = function(sync) {
if (sync && chrome.app.window.current().isMaximized()) {
+ chrome.app.window.current().restore();
this.activate(true);
}
this.hookingWindowEvents_ = sync;
@@ -107,11 +108,19 @@ remoting.FullscreenAppsV2.prototype.onFullscreened_ = function() {
remoting.FullscreenAppsV2.prototype.onMaximized_ = function() {
if (this.hookingWindowEvents_) {
+ chrome.app.window.current().restore();
this.activate(true);
}
};
remoting.FullscreenAppsV2.prototype.onRestored_ = function() {
+ // TODO(jamiewalch): ChromeOS generates a spurious onRestore event if
+ // fullscreen() is called from an onMaximized handler (crbug.com/394819),
+ // so ignore the callback if the window is still full-screen.
+ if (this.isActive()) {
+ return;
+ }
+
document.body.classList.remove('fullscreen');
if (this.hookingWindowEvents_) {
this.activate(false);
« no previous file with comments | « no previous file | remoting/webapp/window_frame.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698