OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 representing the client tool-bar. | 7 * Class representing the client tool-bar. |
8 */ | 8 */ |
9 | 9 |
10 'use strict'; | 10 'use strict'; |
11 | 11 |
12 /** @suppress {duplicate} */ | 12 /** @suppress {duplicate} */ |
13 var remoting = remoting || {}; | 13 var remoting = remoting || {}; |
14 | 14 |
15 /** | 15 /** |
16 * @param {HTMLElement} toolbar The HTML element representing the tool-bar. | 16 * @param {HTMLElement} toolbar The HTML element representing the tool-bar. |
17 * @constructor | 17 * @constructor |
18 */ | 18 */ |
19 remoting.Toolbar = function(toolbar) { | 19 remoting.Toolbar = function(toolbar) { |
20 /** | 20 /** |
21 * @type {HTMLElement} | 21 * @type {HTMLElement} |
22 * @private | 22 * @private |
23 */ | 23 */ |
24 this.toolbar_ = toolbar; | 24 this.toolbar_ = toolbar; |
25 /** | 25 /** |
26 * @type {HTMLElement} | 26 * @type {HTMLElement} |
27 * @private | 27 * @private |
28 */ | 28 */ |
29 this.stub_ = /** @type {HTMLElement} */toolbar.querySelector('.toolbar-stub'); | 29 this.stub_ = |
| 30 /** @type {HTMLElement} */(toolbar.querySelector('.toolbar-stub')); |
30 /** | 31 /** |
31 * @type {number?} The id of the preview timer, if any. | 32 * @type {number?} The id of the preview timer, if any. |
32 * @private | 33 * @private |
33 */ | 34 */ |
34 this.timerId_ = null; | 35 this.timerId_ = null; |
35 /** | 36 /** |
36 * @type {number} The left edge of the tool-bar stub, updated on resize. | 37 * @type {number} The left edge of the tool-bar stub, updated on resize. |
37 * @private | 38 * @private |
38 */ | 39 */ |
39 this.stubLeft_ = 0; | 40 this.stubLeft_ = 0; |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 remoting.optionsMenu.onShow(); | 187 remoting.optionsMenu.onShow(); |
187 }; | 188 }; |
188 | 189 |
189 /** @type {remoting.Toolbar} */ | 190 /** @type {remoting.Toolbar} */ |
190 remoting.toolbar = null; | 191 remoting.toolbar = null; |
191 | 192 |
192 /** @private */ | 193 /** @private */ |
193 remoting.Toolbar.STUB_EXTENDED_CLASS_ = 'toolbar-stub-extended'; | 194 remoting.Toolbar.STUB_EXTENDED_CLASS_ = 'toolbar-stub-extended'; |
194 /** @private */ | 195 /** @private */ |
195 remoting.Toolbar.VISIBLE_CLASS_ = 'toolbar-visible'; | 196 remoting.Toolbar.VISIBLE_CLASS_ = 'toolbar-visible'; |
OLD | NEW |