| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 | 54 |
| 55 /** | 55 /** |
| 56 * @type {HTMLElement} | 56 * @type {HTMLElement} |
| 57 * @private | 57 * @private |
| 58 */ | 58 */ |
| 59 this.optionsMenuList_ = /** @type {HTMLElement} */ | 59 this.optionsMenuList_ = /** @type {HTMLElement} */ |
| 60 (optionsButton.querySelector('.window-options-menu')); | 60 (optionsButton.querySelector('.window-options-menu')); |
| 61 base.debug.assert(this.optionsMenuList_ != null); | 61 base.debug.assert(this.optionsMenuList_ != null); |
| 62 | 62 |
| 63 /** | 63 /** |
| 64 * @type {Array.<{cls:string, fn: function()}>} | 64 * @type {Array<{cls:string, fn: function()}>} |
| 65 */ | 65 */ |
| 66 var handlers = [ | 66 var handlers = [ |
| 67 { cls: 'window-disconnect', fn: this.disconnectSession_.bind(this) }, | 67 { cls: 'window-disconnect', fn: this.disconnectSession_.bind(this) }, |
| 68 { cls: 'window-maximize-restore', | 68 { cls: 'window-maximize-restore', |
| 69 fn: this.maximizeOrRestoreWindow_.bind(this) }, | 69 fn: this.maximizeOrRestoreWindow_.bind(this) }, |
| 70 { cls: 'window-minimize', fn: this.minimizeWindow_.bind(this) }, | 70 { cls: 'window-minimize', fn: this.minimizeWindow_.bind(this) }, |
| 71 { cls: 'window-close', fn: window.close.bind(window) }, | 71 { cls: 'window-close', fn: window.close.bind(window) }, |
| 72 { cls: 'window-controls-stub', fn: this.toggleWindowControls_.bind(this) } | 72 { cls: 'window-controls-stub', fn: this.toggleWindowControls_.bind(this) } |
| 73 ]; | 73 ]; |
| 74 for (var i = 0; i < handlers.length; ++i) { | 74 for (var i = 0; i < handlers.length; ++i) { |
| (...skipping 166 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 |