OLD | NEW |
---|---|
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 Loading... | |
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 }; |
OLD | NEW |