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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 */ | 205 */ |
206 Devices.DevicesView.DiscoveryView = class extends UI.VBox { | 206 Devices.DevicesView.DiscoveryView = class extends UI.VBox { |
207 constructor() { | 207 constructor() { |
208 super(); | 208 super(); |
209 this.setMinimumSize(100, 100); | 209 this.setMinimumSize(100, 100); |
210 this.element.classList.add('discovery-view'); | 210 this.element.classList.add('discovery-view'); |
211 | 211 |
212 this.contentElement.createChild('div', 'hbox device-text-row').createChild('
div', 'view-title').textContent = | 212 this.contentElement.createChild('div', 'hbox device-text-row').createChild('
div', 'view-title').textContent = |
213 Common.UIString('Settings'); | 213 Common.UIString('Settings'); |
214 | 214 |
215 var discoverUsbDevicesCheckbox = UI.createCheckboxLabel(Common.UIString('Dis
cover USB devices')); | 215 var discoverUsbDevicesCheckbox = UI.CheckboxLabel.create(Common.UIString('Di
scover USB devices')); |
216 discoverUsbDevicesCheckbox.classList.add('usb-checkbox'); | 216 discoverUsbDevicesCheckbox.classList.add('usb-checkbox'); |
217 this.element.appendChild(discoverUsbDevicesCheckbox); | 217 this.element.appendChild(discoverUsbDevicesCheckbox); |
218 this._discoverUsbDevicesCheckbox = discoverUsbDevicesCheckbox.checkboxElemen
t; | 218 this._discoverUsbDevicesCheckbox = discoverUsbDevicesCheckbox.checkboxElemen
t; |
219 this._discoverUsbDevicesCheckbox.addEventListener('click', this._updateDisco
veryConfig.bind(this), false); | 219 this._discoverUsbDevicesCheckbox.addEventListener('click', this._updateDisco
veryConfig.bind(this), false); |
220 | 220 |
221 var help = this.element.createChild('div', 'discovery-help'); | 221 var help = this.element.createChild('div', 'discovery-help'); |
222 help.createChild('span').textContent = Common.UIString('Need help? Read Chro
me '); | 222 help.createChild('span').textContent = Common.UIString('Need help? Read Chro
me '); |
223 help.appendChild(UI.createExternalLink( | 223 help.appendChild(UI.createExternalLink( |
224 'https://developers.google.com/chrome-developer-tools/docs/remote-debugg
ing', | 224 'https://developers.google.com/chrome-developer-tools/docs/remote-debugg
ing', |
225 Common.UIString('remote debugging documentation.'))); | 225 Common.UIString('remote debugging documentation.'))); |
226 | 226 |
227 var portForwardingHeader = this.element.createChild('div', 'port-forwarding-
header'); | 227 var portForwardingHeader = this.element.createChild('div', 'port-forwarding-
header'); |
228 var portForwardingEnabledCheckbox = UI.createCheckboxLabel(Common.UIString('
Port forwarding')); | 228 var portForwardingEnabledCheckbox = UI.CheckboxLabel.create(Common.UIString(
'Port forwarding')); |
229 portForwardingEnabledCheckbox.classList.add('port-forwarding-checkbox'); | 229 portForwardingEnabledCheckbox.classList.add('port-forwarding-checkbox'); |
230 portForwardingHeader.appendChild(portForwardingEnabledCheckbox); | 230 portForwardingHeader.appendChild(portForwardingEnabledCheckbox); |
231 this._portForwardingEnabledCheckbox = portForwardingEnabledCheckbox.checkbox
Element; | 231 this._portForwardingEnabledCheckbox = portForwardingEnabledCheckbox.checkbox
Element; |
232 this._portForwardingEnabledCheckbox.addEventListener('click', this._updateDi
scoveryConfig.bind(this), false); | 232 this._portForwardingEnabledCheckbox.addEventListener('click', this._updateDi
scoveryConfig.bind(this), false); |
233 | 233 |
234 var portForwardingFooter = this.element.createChild('div', 'port-forwarding-
footer'); | 234 var portForwardingFooter = this.element.createChild('div', 'port-forwarding-
footer'); |
235 portForwardingFooter.createChild('span').textContent = Common.UIString( | 235 portForwardingFooter.createChild('span').textContent = Common.UIString( |
236 'Define the listening port on your device that maps to a port accessible
from your development machine. '); | 236 'Define the listening port on your device that maps to a port accessible
from your development machine. '); |
237 portForwardingFooter.appendChild(UI.createExternalLink( | 237 portForwardingFooter.appendChild(UI.createExternalLink( |
238 'https://developer.chrome.com/devtools/docs/remote-debugging#port-forwar
ding', Common.UIString('Learn more'))); | 238 'https://developer.chrome.com/devtools/docs/remote-debugging#port-forwar
ding', Common.UIString('Learn more'))); |
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
676 this._portStatus.title = title.join('; '); | 676 this._portStatus.title = title.join('; '); |
677 this._portStatus.classList.toggle('hidden', empty); | 677 this._portStatus.classList.toggle('hidden', empty); |
678 } | 678 } |
679 }; | 679 }; |
680 | 680 |
681 /** @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>}} */ |
682 Devices.DevicesView.BrowserSection; | 682 Devices.DevicesView.BrowserSection; |
683 | 683 |
684 /** @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}} */ |
685 Devices.DevicesView.PageSection; | 685 Devices.DevicesView.PageSection; |
OLD | NEW |