| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 host-list portion of the home screen UI. | 7 * Class representing the host-list portion of the home screen UI. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 'use strict'; | 10 'use strict'; |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 * Show or hide the host-list UI. | 190 * Show or hide the host-list UI. |
| 191 * | 191 * |
| 192 * @param {boolean} show True to show the UI, or false to hide it. | 192 * @param {boolean} show True to show the UI, or false to hide it. |
| 193 * @return {void} Nothing. | 193 * @return {void} Nothing. |
| 194 * @private | 194 * @private |
| 195 */ | 195 */ |
| 196 remoting.HostList.prototype.showOrHide_ = function(show) { | 196 remoting.HostList.prototype.showOrHide_ = function(show) { |
| 197 var parent = /** @type {Element} */ (this.table_.parentNode); | 197 var parent = /** @type {Element} */ (this.table_.parentNode); |
| 198 parent.hidden = !show; | 198 parent.hidden = !show; |
| 199 if (show) { | 199 if (show) { |
| 200 parent.style.height = parent.scrollHeight + 'px'; | |
| 201 removeClass(parent, remoting.HostList.COLLAPSED_); | 200 removeClass(parent, remoting.HostList.COLLAPSED_); |
| 202 } else { | 201 } else { |
| 203 addClass(parent, remoting.HostList.COLLAPSED_); | 202 addClass(parent, remoting.HostList.COLLAPSED_); |
| 204 } | 203 } |
| 205 }; | 204 }; |
| 206 | 205 |
| 207 /** | 206 /** |
| 208 * Remove a host from the list, and deregister it. | 207 * Remove a host from the list, and deregister it. |
| 209 * @param {remoting.HostTableEntry} hostTableEntry The host to be removed. | 208 * @param {remoting.HostTableEntry} hostTableEntry The host to be removed. |
| 210 * @return {void} Nothing. | 209 * @return {void} Nothing. |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 */ | 263 */ |
| 265 remoting.HostList.COLLAPSED_ = 'collapsed'; | 264 remoting.HostList.COLLAPSED_ = 'collapsed'; |
| 266 | 265 |
| 267 /** | 266 /** |
| 268 * Key name under which Me2Me hosts are cached. | 267 * Key name under which Me2Me hosts are cached. |
| 269 */ | 268 */ |
| 270 remoting.HostList.HOSTS_KEY = 'me2me-cached-hosts'; | 269 remoting.HostList.HOSTS_KEY = 'me2me-cached-hosts'; |
| 271 | 270 |
| 272 /** @type {remoting.HostList} */ | 271 /** @type {remoting.HostList} */ |
| 273 remoting.hostList = null; | 272 remoting.hostList = null; |
| OLD | NEW |