| 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 * Apps v2 custom title bar implementation | 7 * Apps v2 custom title bar implementation |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 'use strict'; | 10 'use strict'; |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 * @private | 143 * @private |
| 144 */ | 144 */ |
| 145 remoting.WindowFrame.prototype.disconnectSession_ = function() { | 145 remoting.WindowFrame.prototype.disconnectSession_ = function() { |
| 146 // When the user disconnects, exit full-screen mode. This should not be | 146 // When the user disconnects, exit full-screen mode. This should not be |
| 147 // necessary, as we do the same thing in client_session.js when the plugin | 147 // necessary, as we do the same thing in client_session.js when the plugin |
| 148 // is removed. However, there seems to be a bug in chrome.AppWindow.restore | 148 // is removed. However, there seems to be a bug in chrome.AppWindow.restore |
| 149 // that causes it to get stuck in full-screen mode without this. | 149 // that causes it to get stuck in full-screen mode without this. |
| 150 if (chrome.app.window.current().isFullscreen()) { | 150 if (chrome.app.window.current().isFullscreen()) { |
| 151 chrome.app.window.current().restore(); | 151 chrome.app.window.current().restore(); |
| 152 } | 152 } |
| 153 remoting.disconnect(); | 153 remoting.app.disconnect(); |
| 154 }; | 154 }; |
| 155 | 155 |
| 156 /** | 156 /** |
| 157 * @private | 157 * @private |
| 158 */ | 158 */ |
| 159 remoting.WindowFrame.prototype.maximizeOrRestoreWindow_ = function() { | 159 remoting.WindowFrame.prototype.maximizeOrRestoreWindow_ = function() { |
| 160 /** @type {boolean} */ | 160 /** @type {boolean} */ |
| 161 var restore = | 161 var restore = |
| 162 chrome.app.window.current().isFullscreen() || | 162 chrome.app.window.current().isFullscreen() || |
| 163 chrome.app.window.current().isMaximized(); | 163 chrome.app.window.current().isMaximized(); |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 var hidePreview = function() { | 241 var hidePreview = function() { |
| 242 target.classList.remove('preview'); | 242 target.classList.remove('preview'); |
| 243 }; | 243 }; |
| 244 target.classList.add('preview'); | 244 target.classList.add('preview'); |
| 245 window.setTimeout(hidePreview, kPreviewTimeoutMs); | 245 window.setTimeout(hidePreview, kPreviewTimeoutMs); |
| 246 }; | 246 }; |
| 247 | 247 |
| 248 | 248 |
| 249 /** @type {remoting.WindowFrame} */ | 249 /** @type {remoting.WindowFrame} */ |
| 250 remoting.windowFrame = null; | 250 remoting.windowFrame = null; |
| OLD | NEW |