| 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 * Class handling setting of the local app window shape to account for windows | 7 * Class handling setting of the local app window shape to account for windows |
| 8 * on the remote desktop, as well as any client-side UI. | 8 * on the remote desktop, as well as any client-side UI. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 'use strict'; | 11 'use strict'; |
| 12 | 12 |
| 13 /** @suppress {duplicate} */ | 13 /** @suppress {duplicate} */ |
| 14 var remoting = remoting || {}; | 14 var remoting = remoting || {}; |
| 15 | 15 |
| 16 /** @constructor */ | 16 /** @constructor */ |
| 17 remoting.WindowShape = function() { | 17 remoting.WindowShape = function() { |
| 18 /** | 18 /** @private {Array<{left: number, top: number, |
| 19 * @type {Array<{left: number, top: number, width: number, height: number}>} | 19 width: number, height: number}>} */ |
| 20 * @private | |
| 21 */ | |
| 22 this.desktopRects_ = []; | 20 this.desktopRects_ = []; |
| 23 | 21 |
| 24 /** | 22 /** @private {Array<remoting.WindowShape.ClientUI>} */ |
| 25 * @type {Array<remoting.WindowShape.ClientUI>} | |
| 26 * @private | |
| 27 */ | |
| 28 this.clientUICallbacks_ = []; | 23 this.clientUICallbacks_ = []; |
| 29 }; | 24 }; |
| 30 | 25 |
| 31 /** | 26 /** |
| 32 * @return {boolean} True if setShape is available. | 27 * @return {boolean} True if setShape is available. |
| 33 */ | 28 */ |
| 34 remoting.WindowShape.isSupported = function() { | 29 remoting.WindowShape.isSupported = function() { |
| 35 return base.isAppsV2() && | 30 return base.isAppsV2() && |
| 36 typeof(chrome.app.window.current().setShape) != 'undefined'; | 31 typeof(chrome.app.window.current().setShape) != 'undefined'; |
| 37 } | 32 } |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 * Add the context menu's bounding rectangle to the specified region. | 89 * Add the context menu's bounding rectangle to the specified region. |
| 95 * | 90 * |
| 96 * @param {Array<{left: number, top: number, width: number, height: number}>} | 91 * @param {Array<{left: number, top: number, width: number, height: number}>} |
| 97 * rects | 92 * rects |
| 98 */ | 93 */ |
| 99 remoting.WindowShape.ClientUI.prototype.addToRegion = function(rects) {}; | 94 remoting.WindowShape.ClientUI.prototype.addToRegion = function(rects) {}; |
| 100 | 95 |
| 101 | 96 |
| 102 /** @type {remoting.WindowShape} */ | 97 /** @type {remoting.WindowShape} */ |
| 103 remoting.windowShape = new remoting.WindowShape(); | 98 remoting.windowShape = new remoting.WindowShape(); |
| OLD | NEW |