| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 * @constructor | 6 * @constructor |
| 7 * @extends {WebInspector.VBox} | 7 * @extends {WebInspector.VBox} |
| 8 */ | 8 */ |
| 9 WebInspector.DevicesView = function() | 9 WebInspector.DevicesView = function() |
| 10 { | 10 { |
| (...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 */ | 443 */ |
| 444 update: function(device) | 444 update: function(device) |
| 445 { | 445 { |
| 446 if (!this._device || this._device.adbModel !== device.adbModel) | 446 if (!this._device || this._device.adbModel !== device.adbModel) |
| 447 this._deviceTitle.textContent = device.adbModel; | 447 this._deviceTitle.textContent = device.adbModel; |
| 448 | 448 |
| 449 if (!this._device || this._device.adbSerial !== device.adbSerial) | 449 if (!this._device || this._device.adbSerial !== device.adbSerial) |
| 450 this._deviceSerial.textContent = "#" + device.adbSerial; | 450 this._deviceSerial.textContent = "#" + device.adbSerial; |
| 451 | 451 |
| 452 this._deviceOffline.classList.toggle("hidden", device.adbConnected); | 452 this._deviceOffline.classList.toggle("hidden", device.adbConnected); |
| 453 this._noBrowsers.classList.toggle("hidden", !device.adbConnected || devi
ce.browsers.length); | 453 this._noBrowsers.classList.toggle("hidden", !device.adbConnected || !!de
vice.browsers.length); |
| 454 this._browsers.classList.toggle("hidden", !device.adbConnected || !devic
e.browsers.length); | 454 this._browsers.classList.toggle("hidden", !device.adbConnected || !devic
e.browsers.length); |
| 455 | 455 |
| 456 var browserIds = new Set(); | 456 var browserIds = new Set(); |
| 457 for (var browser of device.browsers) | 457 for (var browser of device.browsers) |
| 458 browserIds.add(browser.id); | 458 browserIds.add(browser.id); |
| 459 | 459 |
| 460 for (var browserId of this._browserById.keys()) { | 460 for (var browserId of this._browserById.keys()) { |
| 461 if (!browserIds.has(browserId)) { | 461 if (!browserIds.has(browserId)) { |
| 462 this._browserById.get(browserId).element.remove(); | 462 this._browserById.get(browserId).element.remove(); |
| 463 this._browserById.remove(browserId); | 463 this._browserById.remove(browserId); |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 687 if (transient.length) | 687 if (transient.length) |
| 688 title.push(WebInspector.UIString("Transient: %s", transient.join(",
"))); | 688 title.push(WebInspector.UIString("Transient: %s", transient.join(",
"))); |
| 689 if (error.length) | 689 if (error.length) |
| 690 title.push(WebInspector.UIString("Error: %s", error.join(", "))); | 690 title.push(WebInspector.UIString("Error: %s", error.join(", "))); |
| 691 this._portStatus.title = title.join("; "); | 691 this._portStatus.title = title.join("; "); |
| 692 this._portStatus.classList.toggle("hidden", empty); | 692 this._portStatus.classList.toggle("hidden", empty); |
| 693 }, | 693 }, |
| 694 | 694 |
| 695 __proto__: WebInspector.VBox.prototype | 695 __proto__: WebInspector.VBox.prototype |
| 696 } | 696 } |
| OLD | NEW |