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', |
67 registerEventListener('toolbar-stub', 'click', | 67 remoting.app.disconnect.bind(remoting.app)); |
68 function() { remoting.toolbar.toggle(); }); | 68 registerEventListener('toolbar-stub', |
| 69 'click', function() { remoting.toolbar.toggle(); }); |
69 | 70 |
70 // Prevent the preview canceling if the user is interacting with the tool-bar. | 71 // Prevent the preview canceling if the user is interacting with the tool-bar. |
71 /** @type {remoting.Toolbar} */ | 72 /** @type {remoting.Toolbar} */ |
72 var that = this; | 73 var that = this; |
73 var stopTimer = function() { | 74 var stopTimer = function() { |
74 if (that.timerId_) { | 75 if (that.timerId_) { |
75 window.clearTimeout(that.timerId_); | 76 window.clearTimeout(that.timerId_); |
76 that.timerId_ = null; | 77 that.timerId_ = null; |
77 } | 78 } |
78 } | 79 } |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 remoting.optionsMenu.onShow(); | 189 remoting.optionsMenu.onShow(); |
189 }; | 190 }; |
190 | 191 |
191 /** @type {remoting.Toolbar} */ | 192 /** @type {remoting.Toolbar} */ |
192 remoting.toolbar = null; | 193 remoting.toolbar = null; |
193 | 194 |
194 /** @private */ | 195 /** @private */ |
195 remoting.Toolbar.STUB_EXTENDED_CLASS_ = 'toolbar-stub-extended'; | 196 remoting.Toolbar.STUB_EXTENDED_CLASS_ = 'toolbar-stub-extended'; |
196 /** @private */ | 197 /** @private */ |
197 remoting.Toolbar.VISIBLE_CLASS_ = 'toolbar-visible'; | 198 remoting.Toolbar.VISIBLE_CLASS_ = 'toolbar-visible'; |
OLD | NEW |