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

Side by Side 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: 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * Full-screen implementation for apps v2, using chrome.AppWindow. 7 * Full-screen implementation for apps v2, using chrome.AppWindow.
8 */ 8 */
9 9
10 'use strict'; 10 'use strict';
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 document.body.classList.add('fullscreen'); 105 document.body.classList.add('fullscreen');
106 }; 106 };
107 107
108 remoting.FullscreenAppsV2.prototype.onMaximized_ = function() { 108 remoting.FullscreenAppsV2.prototype.onMaximized_ = function() {
109 if (this.hookingWindowEvents_) { 109 if (this.hookingWindowEvents_) {
110 this.activate(true); 110 this.activate(true);
111 } 111 }
112 }; 112 };
113 113
114 remoting.FullscreenAppsV2.prototype.onRestored_ = function() { 114 remoting.FullscreenAppsV2.prototype.onRestored_ = function() {
115 // TODO(jamiewalch): ChromeOS generates a spurious onRestore event if
116 // fullscreen() is called from an onMaximized handler (crbug.com/394819),
117 // so test the full-screen status to make sure that this callback is
Wez 2014/07/17 18:49:42 nit: Clarify what you mean by this; i.e. what you
Jamie 2014/07/17 21:36:44 Done.
118 // genuine.
119 if (this.isActive()) {
120 return;
121 }
122
115 document.body.classList.remove('fullscreen'); 123 document.body.classList.remove('fullscreen');
116 if (this.hookingWindowEvents_) { 124 if (this.hookingWindowEvents_) {
117 this.activate(false); 125 this.activate(false);
118 } 126 }
119 if (this.notifyCallbacksOnRestore_) { 127 if (this.notifyCallbacksOnRestore_) {
120 this.notifyCallbacksOnRestore_ = false; 128 this.notifyCallbacksOnRestore_ = false;
121 this.eventSource_.raiseEvent(this.kEventName_, false); 129 this.eventSource_.raiseEvent(this.kEventName_, false);
122 } 130 }
123 }; 131 };
OLDNEW
« 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