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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 remoting.FullscreenAppsV2.prototype.syncWithMaximize = function(sync) { | 95 remoting.FullscreenAppsV2.prototype.syncWithMaximize = function(sync) { |
96 if (sync && chrome.app.window.current().isMaximized()) { | 96 if (sync && chrome.app.window.current().isMaximized()) { |
97 this.activate(true); | 97 this.activate(true); |
98 } | 98 } |
99 this.hookingWindowEvents_ = sync; | 99 this.hookingWindowEvents_ = sync; |
100 }; | 100 }; |
101 | 101 |
102 remoting.FullscreenAppsV2.prototype.onFullscreened_ = function() { | 102 remoting.FullscreenAppsV2.prototype.onFullscreened_ = function() { |
103 this.notifyCallbacksOnRestore_ = true; | 103 this.notifyCallbacksOnRestore_ = true; |
104 this.eventSource_.raiseEvent(this.kEventName_, true); | 104 this.eventSource_.raiseEvent(this.kEventName_, true); |
| 105 document.body.classList.add('fullscreen'); |
105 }; | 106 }; |
106 | 107 |
107 remoting.FullscreenAppsV2.prototype.onMaximized_ = function() { | 108 remoting.FullscreenAppsV2.prototype.onMaximized_ = function() { |
108 if (this.hookingWindowEvents_) { | 109 if (this.hookingWindowEvents_) { |
109 this.activate(true); | 110 this.activate(true); |
110 } | 111 } |
111 }; | 112 }; |
112 | 113 |
113 remoting.FullscreenAppsV2.prototype.onRestored_ = function() { | 114 remoting.FullscreenAppsV2.prototype.onRestored_ = function() { |
| 115 document.body.classList.remove('fullscreen'); |
114 if (this.hookingWindowEvents_) { | 116 if (this.hookingWindowEvents_) { |
115 this.activate(false); | 117 this.activate(false); |
116 } | 118 } |
117 if (this.notifyCallbacksOnRestore_) { | 119 if (this.notifyCallbacksOnRestore_) { |
118 this.notifyCallbacksOnRestore_ = false; | 120 this.notifyCallbacksOnRestore_ = false; |
119 this.eventSource_.raiseEvent(this.kEventName_, false); | 121 this.eventSource_.raiseEvent(this.kEventName_, false); |
120 } | 122 } |
121 }; | 123 }; |
OLD | NEW |