| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 this.toolbar_.classList.toggle(remoting.Toolbar.VISIBLE_CLASS_); | 114 this.toolbar_.classList.toggle(remoting.Toolbar.VISIBLE_CLASS_); |
| 115 }; | 115 }; |
| 116 | 116 |
| 117 /** | 117 /** |
| 118 * @param {remoting.ClientSession} clientSession The active session, or null if | 118 * @param {remoting.ClientSession} clientSession The active session, or null if |
| 119 * there is no connection. | 119 * there is no connection. |
| 120 */ | 120 */ |
| 121 remoting.Toolbar.prototype.setClientSession = function(clientSession) { | 121 remoting.Toolbar.prototype.setClientSession = function(clientSession) { |
| 122 this.optionsMenu_.setClientSession(clientSession); | 122 this.optionsMenu_.setClientSession(clientSession); |
| 123 var connectedTo = document.getElementById('connected-to'); | 123 var connectedTo = document.getElementById('connected-to'); |
| 124 connectedTo.innerText = clientSession.getHostDisplayName(); | 124 connectedTo.innerText = |
| 125 clientSession ? clientSession.getHostDisplayName() : ""; |
| 125 }; | 126 }; |
| 126 | 127 |
| 127 /** | 128 /** |
| 128 * Test the specified co-ordinate to see if it is close enough to the stub | 129 * Test the specified co-ordinate to see if it is close enough to the stub |
| 129 * to activate it. | 130 * to activate it. |
| 130 * | 131 * |
| 131 * @param {number} x The x co-ordinate. | 132 * @param {number} x The x co-ordinate. |
| 132 * @param {number} y The y co-ordinate. | 133 * @param {number} y The y co-ordinate. |
| 133 * @return {boolean} True if the position should activate the tool-bar stub, or | 134 * @return {boolean} True if the position should activate the tool-bar stub, or |
| 134 * false otherwise. | 135 * false otherwise. |
| (...skipping 28 matching lines...) Expand all Loading... |
| 163 } | 164 } |
| 164 }; | 165 }; |
| 165 | 166 |
| 166 /** @type {remoting.Toolbar} */ | 167 /** @type {remoting.Toolbar} */ |
| 167 remoting.toolbar = null; | 168 remoting.toolbar = null; |
| 168 | 169 |
| 169 /** @private */ | 170 /** @private */ |
| 170 remoting.Toolbar.STUB_EXTENDED_CLASS_ = 'toolbar-stub-extended'; | 171 remoting.Toolbar.STUB_EXTENDED_CLASS_ = 'toolbar-stub-extended'; |
| 171 /** @private */ | 172 /** @private */ |
| 172 remoting.Toolbar.VISIBLE_CLASS_ = 'toolbar-visible'; | 173 remoting.Toolbar.VISIBLE_CLASS_ = 'toolbar-visible'; |
| OLD | NEW |