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'; |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
56 * @private | 56 * @private |
57 */ | 57 */ |
58 this.sendKeysMenu_ = new remoting.MenuButton( | 58 this.sendKeysMenu_ = new remoting.MenuButton( |
59 document.getElementById('send-keys-menu') | 59 document.getElementById('send-keys-menu') |
60 ); | 60 ); |
61 | 61 |
62 | 62 |
63 window.addEventListener('mousemove', remoting.Toolbar.onMouseMove, false); | 63 window.addEventListener('mousemove', remoting.Toolbar.onMouseMove, false); |
64 window.addEventListener('resize', this.center.bind(this), false); | 64 window.addEventListener('resize', this.center.bind(this), false); |
65 | 65 |
66 registerEventListener('toolbar-disconnect', 'click', remoting.disconnect); | 66 registerEventListener('toolbar-disconnect', 'click', remoting.app.disconnect); |
Jamie
2015/03/04 01:06:54
bind?
kelvinp
2015/03/04 21:02:21
Done.
| |
67 registerEventListener('toolbar-stub', 'click', | 67 registerEventListener('toolbar-stub', 'click', |
68 function() { remoting.toolbar.toggle(); }); | 68 function() { remoting.toolbar.toggle(); }); |
69 | 69 |
70 // Prevent the preview canceling if the user is interacting with the tool-bar. | 70 // Prevent the preview canceling if the user is interacting with the tool-bar. |
71 /** @type {remoting.Toolbar} */ | 71 /** @type {remoting.Toolbar} */ |
72 var that = this; | 72 var that = this; |
73 var stopTimer = function() { | 73 var stopTimer = function() { |
74 if (that.timerId_) { | 74 if (that.timerId_) { |
75 window.clearTimeout(that.timerId_); | 75 window.clearTimeout(that.timerId_); |
76 that.timerId_ = null; | 76 that.timerId_ = null; |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
188 remoting.optionsMenu.onShow(); | 188 remoting.optionsMenu.onShow(); |
189 }; | 189 }; |
190 | 190 |
191 /** @type {remoting.Toolbar} */ | 191 /** @type {remoting.Toolbar} */ |
192 remoting.toolbar = null; | 192 remoting.toolbar = null; |
193 | 193 |
194 /** @private */ | 194 /** @private */ |
195 remoting.Toolbar.STUB_EXTENDED_CLASS_ = 'toolbar-stub-extended'; | 195 remoting.Toolbar.STUB_EXTENDED_CLASS_ = 'toolbar-stub-extended'; |
196 /** @private */ | 196 /** @private */ |
197 remoting.Toolbar.VISIBLE_CLASS_ = 'toolbar-visible'; | 197 remoting.Toolbar.VISIBLE_CLASS_ = 'toolbar-visible'; |
OLD | NEW |