| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 Network.NetworkConfigView = class extends UI.VBox { | 7 Network.NetworkConfigView = class extends UI.VBox { |
| 8 constructor() { | 8 constructor() { |
| 9 super(true); | 9 super(true); |
| 10 /** @type {!Element} */ | 10 /** @type {!Element} */ |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 var groupElement = userAgentSelectElement.createChild('optgroup'); | 36 var groupElement = userAgentSelectElement.createChild('optgroup'); |
| 37 groupElement.label = userAgentDescriptor.title; | 37 groupElement.label = userAgentDescriptor.title; |
| 38 for (var userAgentVersion of userAgentDescriptor.values) { | 38 for (var userAgentVersion of userAgentDescriptor.values) { |
| 39 var userAgentValue = SDK.MultitargetNetworkManager.patchUserAgentWithChr
omeVersion(userAgentVersion.value); | 39 var userAgentValue = SDK.MultitargetNetworkManager.patchUserAgentWithChr
omeVersion(userAgentVersion.value); |
| 40 groupElement.appendChild(new Option(userAgentVersion.title, userAgentVal
ue)); | 40 groupElement.appendChild(new Option(userAgentVersion.title, userAgentVal
ue)); |
| 41 } | 41 } |
| 42 } | 42 } |
| 43 | 43 |
| 44 userAgentSelectElement.selectedIndex = 0; | 44 userAgentSelectElement.selectedIndex = 0; |
| 45 | 45 |
| 46 var otherUserAgentElement = createElement('input'); | 46 var otherUserAgentElement = UI.createInput('', 'text'); |
| 47 otherUserAgentElement.type = 'text'; | |
| 48 otherUserAgentElement.value = userAgentSetting.get(); | 47 otherUserAgentElement.value = userAgentSetting.get(); |
| 49 otherUserAgentElement.title = userAgentSetting.get(); | 48 otherUserAgentElement.title = userAgentSetting.get(); |
| 50 otherUserAgentElement.placeholder = Common.UIString('Enter a custom user age
nt'); | 49 otherUserAgentElement.placeholder = Common.UIString('Enter a custom user age
nt'); |
| 51 otherUserAgentElement.required = true; | 50 otherUserAgentElement.required = true; |
| 52 | 51 |
| 53 settingChanged(); | 52 settingChanged(); |
| 54 userAgentSelectElement.addEventListener('change', userAgentSelected, false); | 53 userAgentSelectElement.addEventListener('change', userAgentSelected, false); |
| 55 otherUserAgentElement.addEventListener('input', applyOtherUserAgent, false); | 54 otherUserAgentElement.addEventListener('input', applyOtherUserAgent, false); |
| 56 | 55 |
| 57 function userAgentSelected() { | 56 function userAgentSelected() { |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 value: 'UCWEB/2.0 (iPad; U; CPU OS 7_1 like Mac OS X; en; iPad3,6) U2/1.
0.0 UCBrowser/9.3.1.344' | 353 value: 'UCWEB/2.0 (iPad; U; CPU OS 7_1 like Mac OS X; en; iPad3,6) U2/1.
0.0 UCBrowser/9.3.1.344' |
| 355 }, | 354 }, |
| 356 { | 355 { |
| 357 title: 'UC Browser \u2014 Windows Phone', | 356 title: 'UC Browser \u2014 Windows Phone', |
| 358 value: | 357 value: |
| 359 'NokiaX2-02/2.0 (11.79) Profile/MIDP-2.1 Configuration/CLDC-1.1 Mozi
lla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2;.NET CLR 2.0.5
0727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2) U
CBrowser8.4.0.159/70/352' | 358 'NokiaX2-02/2.0 (11.79) Profile/MIDP-2.1 Configuration/CLDC-1.1 Mozi
lla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2;.NET CLR 2.0.5
0727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2) U
CBrowser8.4.0.159/70/352' |
| 360 } | 359 } |
| 361 ] | 360 ] |
| 362 } | 361 } |
| 363 ]; | 362 ]; |
| OLD | NEW |