| 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 30 matching lines...) Expand all Loading... |
| 41 * @type {number} The right edge of the tool-bar stub, updated on resize. | 41 * @type {number} The right edge of the tool-bar stub, updated on resize. |
| 42 * @private | 42 * @private |
| 43 */ | 43 */ |
| 44 this.stubRight_ = 0; | 44 this.stubRight_ = 0; |
| 45 | 45 |
| 46 window.addEventListener('mousemove', remoting.Toolbar.onMouseMove, false); | 46 window.addEventListener('mousemove', remoting.Toolbar.onMouseMove, false); |
| 47 window.addEventListener('resize', this.center.bind(this), false); | 47 window.addEventListener('resize', this.center.bind(this), false); |
| 48 | 48 |
| 49 registerEventListener('new-connection', 'click', | 49 registerEventListener('new-connection', 'click', |
| 50 function() { | 50 function() { |
| 51 chrome.app.window.create('main.html', { 'width': 800, 'height': 600 }); | 51 chrome.app.window.create('main.html', { |
| 52 'width': 800, |
| 53 'height': 600, |
| 54 'frame': "none" |
| 55 }); |
| 52 }); | 56 }); |
| 53 registerEventListener('send-ctrl-alt-del', 'click', remoting.sendCtrlAltDel); | 57 registerEventListener('send-ctrl-alt-del', 'click', remoting.sendCtrlAltDel); |
| 54 registerEventListener('send-print-screen', 'click', remoting.sendPrintScreen); | 58 registerEventListener('send-print-screen', 'click', remoting.sendPrintScreen); |
| 55 registerEventListener('sign-out', 'click', remoting.signOut); | 59 registerEventListener('sign-out', 'click', remoting.signOut); |
| 56 registerEventListener('toolbar-disconnect', 'click', remoting.disconnect); | 60 registerEventListener('toolbar-disconnect', 'click', remoting.disconnect); |
| 57 registerEventListener('toolbar-stub', 'click', | 61 registerEventListener('toolbar-stub', 'click', |
| 58 function() { remoting.toolbar.toggle(); }); | 62 function() { remoting.toolbar.toggle(); }); |
| 59 | 63 |
| 60 // Prevent the preview canceling if the user is interacting with the tool-bar. | 64 // Prevent the preview canceling if the user is interacting with the tool-bar. |
| 61 /** @type {remoting.Toolbar} */ | 65 /** @type {remoting.Toolbar} */ |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 } | 146 } |
| 143 }; | 147 }; |
| 144 | 148 |
| 145 /** @type {remoting.Toolbar} */ | 149 /** @type {remoting.Toolbar} */ |
| 146 remoting.toolbar = null; | 150 remoting.toolbar = null; |
| 147 | 151 |
| 148 /** @private */ | 152 /** @private */ |
| 149 remoting.Toolbar.STUB_EXTENDED_CLASS_ = 'toolbar-stub-extended'; | 153 remoting.Toolbar.STUB_EXTENDED_CLASS_ = 'toolbar-stub-extended'; |
| 150 /** @private */ | 154 /** @private */ |
| 151 remoting.Toolbar.VISIBLE_CLASS_ = 'toolbar-visible'; | 155 remoting.Toolbar.VISIBLE_CLASS_ = 'toolbar-visible'; |
| OLD | NEW |