| 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 * @unrestricted | 5 * @unrestricted |
| 6 */ | 6 */ |
| 7 Devices.DevicesView = class extends UI.VBox { | 7 Devices.DevicesView = class extends UI.VBox { |
| 8 constructor() { | 8 constructor() { |
| 9 super(true); | 9 super(true); |
| 10 this.registerRequiredCSS('devices/devicesView.css'); | 10 this.registerRequiredCSS('devices/devicesView.css'); |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 this._selectedListItem = listItem; | 79 this._selectedListItem = listItem; |
| 80 this._visibleView.show(this._viewContainer); | 80 this._visibleView.show(this._viewContainer); |
| 81 this._selectedListItem.classList.add('selected'); | 81 this._selectedListItem.classList.add('selected'); |
| 82 } | 82 } |
| 83 | 83 |
| 84 /** | 84 /** |
| 85 * @param {!Common.Event} event | 85 * @param {!Common.Event} event |
| 86 */ | 86 */ |
| 87 _devicesUpdated(event) { | 87 _devicesUpdated(event) { |
| 88 this._devices = | 88 this._devices = |
| 89 /** @type {!Array.<!Adb.Device>} */ (event.data).slice().filter(d => d.a
dbSerial.toUpperCase() !== 'WEBRTC'); | 89 /** @type {!Array.<!Adb.Device>} */ (event.data) |
| 90 .slice() |
| 91 .filter(d => d.adbSerial.toUpperCase() !== 'WEBRTC' && d.adbSerial.t
oUpperCase() !== 'LOCALHOST'); |
| 90 for (var device of this._devices) { | 92 for (var device of this._devices) { |
| 91 if (!device.adbConnected) | 93 if (!device.adbConnected) |
| 92 device.adbModel = Common.UIString('Unknown'); | 94 device.adbModel = Common.UIString('Unknown'); |
| 93 } | 95 } |
| 94 | 96 |
| 95 var ids = new Set(); | 97 var ids = new Set(); |
| 96 for (var device of this._devices) | 98 for (var device of this._devices) |
| 97 ids.add(device.id); | 99 ids.add(device.id); |
| 98 | 100 |
| 99 var selectedRemoved = false; | 101 var selectedRemoved = false; |
| (...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 674 this._portStatus.title = title.join('; '); | 676 this._portStatus.title = title.join('; '); |
| 675 this._portStatus.classList.toggle('hidden', empty); | 677 this._portStatus.classList.toggle('hidden', empty); |
| 676 } | 678 } |
| 677 }; | 679 }; |
| 678 | 680 |
| 679 /** @typedef {!{browser: ?Adb.Browser, element: !Element, title: !Element, pages
: !Element, viewMore: !Element, newTab: !Element, pageSections: !Map<string, !De
vices.DevicesView.PageSection>}} */ | 681 /** @typedef {!{browser: ?Adb.Browser, element: !Element, title: !Element, pages
: !Element, viewMore: !Element, newTab: !Element, pageSections: !Map<string, !De
vices.DevicesView.PageSection>}} */ |
| 680 Devices.DevicesView.BrowserSection; | 682 Devices.DevicesView.BrowserSection; |
| 681 | 683 |
| 682 /** @typedef {!{page: ?Adb.Page, element: !Element, title: !Element, url: !Eleme
nt, inspect: !Element}} */ | 684 /** @typedef {!{page: ?Adb.Page, element: !Element, title: !Element, url: !Eleme
nt, inspect: !Element}} */ |
| 683 Devices.DevicesView.PageSection; | 685 Devices.DevicesView.PageSection; |
| OLD | NEW |