Chromium Code Reviews| 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 /** | 5 /** |
| 6 * @constructor | 6 * @constructor |
| 7 * @extends {WebInspector.VBox} | 7 * @extends {WebInspector.VBox} |
| 8 */ | 8 */ |
| 9 WebInspector.NetworkConfigView = function() | 9 WebInspector.NetworkConfigView = function() |
| 10 { | 10 { |
| 11 WebInspector.VBox.call(this, true); | 11 WebInspector.VBox.call(this, true); |
| 12 this.registerRequiredCSS("network/networkConfigView.css"); | 12 this.registerRequiredCSS("network/networkConfigView.css"); |
| 13 this.contentElement.classList.add("network-config"); | 13 this.contentElement.classList.add("network-config"); |
| 14 | 14 |
| 15 this._createCacheSection(); | 15 this._createCacheSection(); |
| 16 this.contentElement.createChild("div").classList.add("panel-section-separato r"); | |
| 16 this._createNetworkThrottlingSection(); | 17 this._createNetworkThrottlingSection(); |
| 18 this.contentElement.createChild("div").classList.add("panel-section-separato r"); | |
|
lushnikov
2016/04/20 23:57:09
this is a dupe line
luoe
2016/04/21 01:17:38
The dupe is needed since we need two dividers.
lushnikov
2016/04/21 17:10:30
Thank you for clarification
| |
| 17 this._createUserAgentSection(); | 19 this._createUserAgentSection(); |
| 18 } | 20 } |
| 19 | 21 |
| 20 WebInspector.NetworkConfigView.prototype = { | 22 WebInspector.NetworkConfigView.prototype = { |
| 21 /** | 23 /** |
| 22 * @param {string} title | 24 * @param {string} title |
| 23 * @param {string=} className | 25 * @param {string=} className |
| 24 * @return {!Element} | 26 * @return {!Element} |
| 25 */ | 27 */ |
| 26 _createSection: function(title, className) | 28 _createSection: function(title, className) |
| 27 { | 29 { |
| 28 var section = this.contentElement.createChild("section", "network-config -group"); | 30 var section = this.contentElement.createChild("section", "network-config -group"); |
| 29 if (className) | 31 if (className) |
| 30 section.classList.add(className); | 32 section.classList.add(className); |
| 31 section.createChild("div", "network-config-title").textContent = title; | 33 section.createChild("div", "network-config-title").textContent = title; |
| 32 return section.createChild("div", "network-config-fields"); | 34 return section.createChild("div", "network-config-fields"); |
| 33 }, | 35 }, |
| 34 | 36 |
| 35 _createCacheSection: function() | 37 _createCacheSection: function() |
| 36 { | 38 { |
| 37 var section = this._createSection(WebInspector.UIString("Disk cache"), " network-config-disable-cache"); | 39 var section = this._createSection(WebInspector.UIString("Caching"), "net work-config-disable-cache"); |
| 38 section.appendChild(WebInspector.SettingsUI.createSettingCheckbox(WebIns pector.UIString("Disable cache"), WebInspector.moduleSetting("cacheDisabled"), t rue)); | 40 section.appendChild(WebInspector.SettingsUI.createSettingCheckbox(WebIns pector.UIString("Disable cache"), WebInspector.moduleSetting("cacheDisabled"), t rue)); |
| 39 }, | 41 }, |
| 40 | 42 |
| 41 _createNetworkThrottlingSection: function() | 43 _createNetworkThrottlingSection: function() |
| 42 { | 44 { |
| 43 var section = this._createSection(WebInspector.UIString("Network throttl ing"), "network-config-throttling"); | 45 var section = this._createSection(WebInspector.UIString("Network throttl ing"), "network-config-throttling"); |
| 44 WebInspector.NetworkConditionsSelector.decorateSelect(/** @type {!HTMLSe lectElement} */(section.createChild("select", "chrome-select"))); | 46 WebInspector.NetworkConditionsSelector.decorateSelect(/** @type {!HTMLSe lectElement} */(section.createChild("select", "chrome-select"))); |
| 45 }, | 47 }, |
| 46 | 48 |
| 47 _createUserAgentSection: function() | 49 _createUserAgentSection: function() |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 83 __proto__ : WebInspector.VBox.prototype | 85 __proto__ : WebInspector.VBox.prototype |
| 84 } | 86 } |
| 85 | 87 |
| 86 | 88 |
| 87 /** | 89 /** |
| 88 * @return {{select: !Element, input: !Element}} | 90 * @return {{select: !Element, input: !Element}} |
| 89 */ | 91 */ |
| 90 WebInspector.NetworkConfigView.createUserAgentSelectAndInput = function() | 92 WebInspector.NetworkConfigView.createUserAgentSelectAndInput = function() |
| 91 { | 93 { |
| 92 var userAgentSetting = WebInspector.settings.createSetting("customUserAgent" , ""); | 94 var userAgentSetting = WebInspector.settings.createSetting("customUserAgent" , ""); |
| 93 const noOverride = {title: WebInspector.UIString("No override"), value: ""}; | 95 var userAgentSelectElement = createElement("select"); |
| 94 const customOverride = {title: WebInspector.UIString("Other"), value: "Other "}; | |
| 95 var userAgents = [noOverride].concat(WebInspector.NetworkConfigView._userAge nts).concat([customOverride]); | |
| 96 | 96 |
| 97 var userAgentSelectElement = createElement("select"); | 97 const customOverrideValue = "custom"; |
| 98 for (var i = 0; i < userAgents.length; ++i) | 98 const customOverride = {title: WebInspector.UIString("Custom..."), value: cu stomOverrideValue}; |
| 99 userAgentSelectElement.add(new Option(userAgents[i].title, userAgents[i] .value)); | 99 userAgentSelectElement.appendChild(new Option(customOverride.title, customOv erride.value)); |
| 100 userAgentSelectElement.selectedIndex = 0; | 100 |
| 101 var groups = WebInspector.NetworkConfigView._userAgentGroups; | |
| 102 for (var userAgentDescriptor of WebInspector.NetworkConfigView._userAgentGro ups) { | |
| 103 var groupElement = userAgentSelectElement.createChild("optgroup"); | |
| 104 groupElement.label = userAgentDescriptor.title; | |
| 105 for (var userAgentVersion of userAgentDescriptor.values) { | |
|
lushnikov
2016/04/20 23:57:09
style: omit {}
we don't use {} for single-line bl
luoe
2016/04/21 01:17:38
Done.
| |
| 106 groupElement.appendChild(new Option(userAgentVersion.title, userAgen tVersion.value)); | |
| 107 } | |
| 108 } | |
| 109 | |
| 110 var agentValues = Array.prototype.map.call(userAgentSelectElement.options, x => x.value); | |
| 111 var customAgentIndex = agentValues.indexOf(customOverrideValue); | |
|
lushnikov
2016/04/20 23:57:09
wait, isn't it always a zero?
luoe
2016/04/21 01:17:38
Yes. If we ever reorder the options UI, move "cust
lushnikov
2016/04/21 17:10:30
Yeah, i'd remove it unless it is needed.
luoe
2016/04/22 00:14:47
Done.
| |
| 112 userAgentSelectElement.selectedIndex = customOverrideValue; | |
|
lushnikov
2016/04/20 23:57:09
you probably wanted to assign selectedIndex to cus
luoe
2016/04/21 01:17:38
Done.
| |
| 101 | 113 |
| 102 var otherUserAgentElement = createElement("input"); | 114 var otherUserAgentElement = createElement("input"); |
| 103 otherUserAgentElement.type = "text"; | 115 otherUserAgentElement.type = "text"; |
| 104 otherUserAgentElement.value = userAgentSetting.get(); | 116 otherUserAgentElement.value = userAgentSetting.get(); |
| 105 otherUserAgentElement.title = userAgentSetting.get(); | 117 otherUserAgentElement.title = userAgentSetting.get(); |
| 106 | 118 |
| 107 settingChanged(); | 119 settingChanged(); |
| 108 userAgentSelectElement.addEventListener("change", userAgentSelected, false); | 120 userAgentSelectElement.addEventListener("change", userAgentSelected, false); |
| 109 | 121 |
| 110 otherUserAgentElement.addEventListener("dblclick", textDoubleClicked, true); | 122 otherUserAgentElement.addEventListener("dblclick", textDoubleClicked, true); |
| 111 otherUserAgentElement.addEventListener("blur", textChanged, false); | 123 otherUserAgentElement.addEventListener("blur", textChanged, false); |
| 112 otherUserAgentElement.addEventListener("keydown", textKeyDown, false); | 124 otherUserAgentElement.addEventListener("keydown", textKeyDown, false); |
| 113 | 125 |
| 126 | |
|
lushnikov
2016/04/20 23:57:09
stray line
lushnikov
2016/04/21 17:10:30
can you please remove unneeded newline?
luoe
2016/04/22 00:14:47
Done.
| |
| 114 function userAgentSelected() | 127 function userAgentSelected() |
| 115 { | 128 { |
| 116 var value = userAgentSelectElement.options[userAgentSelectElement.select edIndex].value; | 129 var value = userAgentSelectElement.options[userAgentSelectElement.select edIndex].value; |
| 117 if (value !== customOverride.value) { | 130 if (value !== customOverride.value) { |
| 118 userAgentSetting.set(value); | 131 userAgentSetting.set(value); |
| 119 otherUserAgentElement.value = value; | 132 otherUserAgentElement.value = value; |
| 120 otherUserAgentElement.title = value; | 133 otherUserAgentElement.title = value; |
| 121 otherUserAgentElement.readOnly = true; | 134 otherUserAgentElement.readOnly = true; |
| 122 } else { | 135 } else { |
| 123 otherUserAgentElement.readOnly = false; | 136 otherUserAgentElement.readOnly = false; |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 134 for (var i = 0; i < options.length; ++i) { | 147 for (var i = 0; i < options.length; ++i) { |
| 135 if (options[i].value === value) { | 148 if (options[i].value === value) { |
| 136 userAgentSelectElement.selectedIndex = i; | 149 userAgentSelectElement.selectedIndex = i; |
| 137 selectionRestored = true; | 150 selectionRestored = true; |
| 138 break; | 151 break; |
| 139 } | 152 } |
| 140 } | 153 } |
| 141 | 154 |
| 142 otherUserAgentElement.readOnly = selectionRestored; | 155 otherUserAgentElement.readOnly = selectionRestored; |
| 143 if (!selectionRestored) | 156 if (!selectionRestored) |
| 144 userAgentSelectElement.selectedIndex = options.length - 1; | 157 userAgentSelectElement.selectedIndex = customAgentIndex; |
| 145 | 158 |
| 146 if (otherUserAgentElement.value !== value) { | 159 if (otherUserAgentElement.value !== value) { |
| 147 otherUserAgentElement.value = value; | 160 otherUserAgentElement.value = value; |
| 148 otherUserAgentElement.title = value; | 161 otherUserAgentElement.title = value; |
| 149 } | 162 } |
| 150 } | 163 } |
| 151 | 164 |
| 152 function textKeyDown(event) | 165 function textKeyDown(event) |
| 153 { | 166 { |
| 154 if (isEnterKey(event)) | 167 if (isEnterKey(event)) |
| 155 textChanged(); | 168 textChanged(); |
| 156 } | 169 } |
| 157 | 170 |
| 158 function textDoubleClicked() | 171 function textDoubleClicked() |
| 159 { | 172 { |
| 160 if (userAgentSelectElement.selectedIndex === userAgents.length - 1) | 173 if (userAgentSelectElement.selectedIndex === customAgentIndex) |
| 161 return; | 174 return; |
| 162 userAgentSelectElement.selectedIndex = userAgents.length - 1; | 175 userAgentSelectElement.selectedIndex = customAgentIndex; |
| 163 userAgentSelected(); | 176 userAgentSelected(); |
| 164 } | 177 } |
| 165 | 178 |
| 166 function textChanged() | 179 function textChanged() |
| 167 { | 180 { |
| 168 if (userAgentSetting.get() !== otherUserAgentElement.value) { | 181 if (userAgentSetting.get() !== otherUserAgentElement.value) { |
| 169 userAgentSetting.set(otherUserAgentElement.value); | 182 userAgentSetting.set(otherUserAgentElement.value); |
| 170 settingChanged(); | 183 settingChanged(); |
| 171 } | 184 } |
| 172 } | 185 } |
| 173 | 186 |
| 174 return { select: userAgentSelectElement, input: otherUserAgentElement }; | 187 return { select: userAgentSelectElement, input: otherUserAgentElement }; |
| 175 } | 188 } |
| 176 | 189 |
| 177 /** @type {!Array.<{title: string, value: string}>} */ | 190 |
| 178 WebInspector.NetworkConfigView._userAgents = [ | 191 /** @type {!Array.<{title: string, value: !Array.<{title: string, value: string} >}>} */ |
| 179 {title: "Android (4.0.2) Browser \u2014 Galaxy Nexus", value: "Mozilla/5.0 ( Linux; U; Android 4.0.2; en-us; Galaxy Nexus Build/ICL53F) AppleWebKit/534.30 (K HTML, like Gecko) Version/4.0 Mobile Safari/534.30"}, | 192 WebInspector.NetworkConfigView._userAgentGroups = [ |
| 180 {title: "Android (2.3) Browser \u2014 Nexus S", value: "Mozilla/5.0 (Linux; U; Android 2.3.6; en-us; Nexus S Build/GRK39F) AppleWebKit/533.1 (KHTML, like Ge cko) Version/4.0 Mobile Safari/533.1"}, | 193 { |
| 181 {title: "BlackBerry \u2014 BB10", value: "Mozilla/5.0 (BB10; Touch) AppleWeb Kit/537.1+ (KHTML, like Gecko) Version/10.0.0.1337 Mobile Safari/537.1+"}, | 194 title: "Android", |
| 182 {title: "BlackBerry \u2014 PlayBook 2.1", value: "Mozilla/5.0 (PlayBook; U; RIM Tablet OS 2.1.0; en-US) AppleWebKit/536.2+ (KHTML, like Gecko) Version/7.2.1 .0 Safari/536.2+"}, | 195 values: [ |
| 183 {title: "BlackBerry \u2014 9900", value: "Mozilla/5.0 (BlackBerry; U; BlackB erry 9900; en-US) AppleWebKit/534.11+ (KHTML, like Gecko) Version/7.0.0.187 Mobi le Safari/534.11+"}, | 196 {title: "Android (4.0.2) Browser \u2014 Galaxy Nexus", value: "Mozil la/5.0 (Linux; U; Android 4.0.2; en-us; Galaxy Nexus Build/ICL53F) AppleWebKit/5 34.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30"}, |
| 184 {title: "Chrome 47 \u2014 Mac", value: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.80 Safari/53 7.36"}, | 197 {title: "Android (2.3) Browser \u2014 Nexus S", value: "Mozilla/5.0 (Linux; U; Android 2.3.6; en-us; Nexus S Build/GRK39F) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1"} |
| 185 {title: "Chrome 47 \u2014 Windows", value: "Mozilla/5.0 (Windows NT 10.0; WO W64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36"}, | 198 ] |
| 186 {title: "Chrome 47 \u2014 Android Tablet", value: "Mozilla/5.0 (Linux; Andro id 4.3; Nexus 7 Build/JSS15Q) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0 .2526.76 Safari/537.36"}, | 199 }, |
| 187 {title: "Chrome 47 \u2014 Android Mobile", value: "Mozilla/5.0 (Linux; Andro id 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0 .2526.76 Mobile Safari/537.36"}, | 200 { |
| 188 {title: "Chrome 47 \u2014 iPad", value: "Mozilla/5.0 (iPad; CPU OS 9_1 like Mac OS X) AppleWebKit/601.1 (KHTML, like Gecko) CriOS/47.0.2526.70 Mobile/13B143 Safari/601.1.46"}, | 201 title: "BlackBerry", |
| 189 {title: "Chrome 47 \u2014 iPhone", value: "Mozilla/5.0 (iPhone; CPU iPhone O S 9_1 like Mac OS X) AppleWebKit/601.1 (KHTML, like Gecko) CriOS/47.0.2526.70 Mo bile/13B143 Safari/601.1.46"}, | 202 values: [ |
| 190 {title: "Firefox 42 \u2014 Android Mobile", value: "Mozilla/5.0 (Android 4.4 ; Mobile; rv:42.0) Gecko/42.0 Firefox/42.0"}, | 203 {title: "BlackBerry \u2014 BB10", value: "Mozilla/5.0 (BB10; Touch) AppleWebKit/537.1+ (KHTML, like Gecko) Version/10.0.0.1337 Mobile Safari/537.1+" }, |
| 191 {title: "Firefox 42 \u2014 Android Tablet", value: "Mozilla/5.0 (Android 4.4 ; Tablet; rv:42.0) Gecko/42.0 Firefox/42.0"}, | 204 {title: "BlackBerry \u2014 PlayBook 2.1", value: "Mozilla/5.0 (PlayB ook; U; RIM Tablet OS 2.1.0; en-US) AppleWebKit/536.2+ (KHTML, like Gecko) Versi on/7.2.1.0 Safari/536.2+"}, |
| 192 {title: "Firefox 42 \u2014 Mac", value: "Mozilla/5.0 (Macintosh; Intel Mac O S X 10.11; rv:42.0) Gecko/20100101 Firefox/42.0"}, | 205 {title: "BlackBerry \u2014 9900", value: "Mozilla/5.0 (BlackBerry; U ; BlackBerry 9900; en-US) AppleWebKit/534.11+ (KHTML, like Gecko) Version/7.0.0. 187 Mobile Safari/534.11+"} |
| 193 {title: "Firefox 42 \u2014 Windows", value: "Mozilla/5.0 (Windows NT 10.0; W OW64; rv:42.0) Gecko/20100101 Firefox/42.0"}, | 206 ] |
| 194 {title: "Googlebot", value: "Mozilla/5.0 (compatible; Googlebot/2.1; +http:/ /www.google.com/bot.html)"}, | 207 }, |
| 195 {title: "Googlebot Smartphone", value: "Mozilla/5.0 (Linux; Android 6.0.1; N exus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.96 Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.htm l)"}, | 208 { |
| 196 {title: "Microsoft Edge", value: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/1 2.10240"}, | 209 title: "Chrome", |
| 197 {title: "Internet Explorer 11", value: "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko"}, | 210 values: [ |
| 198 {title: "Internet Explorer 10", value: "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)"}, | 211 {title: "Chrome 47 \u2014 Mac", value: "Mozilla/5.0 (Macintosh; Inte l Mac OS X 10_11_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.80 S afari/537.36"}, |
| 199 {title: "Internet Explorer 8", value: "Mozilla/4.0 (compatible; MSIE 8.0; Wi ndows NT 6.0; Trident/4.0)"}, | 212 {title: "Chrome 47 \u2014 Windows", value: "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/5 37.36"}, |
| 200 {title: "Internet Explorer 9", value: "Mozilla/5.0 (compatible; MSIE 9.0; Wi ndows NT 6.1; Trident/5.0)"}, | 213 {title: "Chrome 47 \u2014 Android Tablet", value: "Mozilla/5.0 (Linu x; Android 4.3; Nexus 7 Build/JSS15Q) AppleWebKit/537.36 (KHTML, like Gecko) Chr ome/47.0.2526.76 Safari/537.36"}, |
| 201 {title: "Internet Explorer 7", value: "Mozilla/4.0 (compatible; MSIE 7.0; Wi ndows NT 6.0)"}, | 214 {title: "Chrome 47 \u2014 Android Mobile", value: "Mozilla/5.0 (Linu x; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chr ome/47.0.2526.76 Mobile Safari/537.36"}, |
| 202 {title: "iPad \u2014 iOS 9", value: "Mozilla/5.0 (iPad; CPU OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B137 Safari/ 601.1"}, | 215 {title: "Chrome 47 \u2014 iPad", value: "Mozilla/5.0 (iPad; CPU OS 9 _1 like Mac OS X) AppleWebKit/601.1 (KHTML, like Gecko) CriOS/47.0.2526.70 Mobil e/13B143 Safari/601.1.46"}, |
| 203 {title: "iPhone \u2014 iOS 9", value: "Mozilla/5.0 (iPhone; CPU iPhone OS 9_ 1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B 137 Safari/601.1"}, | 216 {title: "Chrome 47 \u2014 iPhone", value: "Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1 (KHTML, like Gecko) CriOS/47.0.25 26.70 Mobile/13B143 Safari/601.1.46"} |
| 204 {title: "MeeGo \u2014 Nokia N9", value: "Mozilla/5.0 (MeeGo; NokiaN9) AppleW ebKit/534.13 (KHTML, like Gecko) NokiaBrowser/8.5.0 Mobile Safari/534.13"}, | 217 ] |
| 205 {title: "Opera 33 \u2014 Mac", value: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537 .36 OPR/33.0.1990.115"}, | 218 }, |
| 206 {title: "Opera 33 \u2014 Windows", value: "Mozilla/5.0 (Windows NT 10.0; WOW 64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.71 Safari/537.36 OPR /33.0.1990.43"}, | 219 { |
| 207 {title: "Opera 12 \u2014 Mac", value: "Opera/9.80 (Macintosh; Intel Mac OS X 10.9.1) Presto/2.12.388 Version/12.16"}, | 220 title: "Firefox", |
| 208 {title: "Opera 12 \u2014 Windows", value: "Opera/9.80 (Windows NT 6.1) Prest o/2.12.388 Version/12.16"}, | 221 values: [ |
| 209 {title: "Silk \u2014 Kindle Fire (Desktop view)", value: "Mozilla/5.0 (Linux ; U; en-us; KFTHWI Build/JDQ39) AppleWebKit/535.19 (KHTML, like Gecko) Silk/3.13 Safari/535.19 Silk-Accelerated=true"}, | 222 {title: "Firefox 42 \u2014 Android Mobile", value: "Mozilla/5.0 (And roid 4.4; Mobile; rv:42.0) Gecko/42.0 Firefox/42.0"}, |
| 210 {title: "Silk \u2014 Kindle Fire (Mobile view)", value: "Mozilla/5.0 (Linux; U; Android 4.2.2; en-us; KFTHWI Build/JDQ39) AppleWebKit/535.19 (KHTML, like Ge cko) Silk/3.13 Mobile Safari/535.19 Silk-Accelerated=true"} | 223 {title: "Firefox 42 \u2014 Android Tablet", value: "Mozilla/5.0 (And roid 4.4; Tablet; rv:42.0) Gecko/42.0 Firefox/42.0"}, |
| 211 ]; | 224 {title: "Firefox 42 \u2014 Mac", value: "Mozilla/5.0 (Macintosh; Int el Mac OS X 10.11; rv:42.0) Gecko/20100101 Firefox/42.0"}, |
| 225 {title: "Firefox 42 \u2014 Windows", value: "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0"} | |
| 226 ] | |
| 227 }, | |
| 228 { | |
| 229 title: "Googlebot", | |
| 230 values: [ | |
| 231 {title: "Googlebot", value: "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"}, | |
| 232 {title: "Googlebot Smartphone", value: "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0 .2272.96 Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com /bot.html)"} | |
| 233 ] | |
| 234 }, | |
| 235 { | |
| 236 title: "Edge", | |
| 237 values: [ | |
| 238 {title: "Microsoft Edge", value: "Mozilla/5.0 (Windows NT 10.0; Win6 4; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.3 6 Edge/12.10240"} | |
| 239 ] | |
| 240 }, | |
| 241 { | |
| 242 title: "Internet Explorer", | |
| 243 values: [ | |
| 244 {title: "Internet Explorer 11", value: "Mozilla/5.0 (Windows NT 10.0 ; WOW64; Trident/7.0; rv:11.0) like Gecko"}, | |
| 245 {title: "Internet Explorer 10", value: "Mozilla/5.0 (compatible; MSI E 10.0; Windows NT 6.1; WOW64; Trident/6.0)"}, | |
| 246 {title: "Internet Explorer 8", value: "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0)"}, | |
| 247 {title: "Internet Explorer 9", value: "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)"}, | |
| 248 {title: "Internet Explorer 7", value: "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)"} | |
| 249 ] | |
| 250 }, | |
| 251 { | |
| 252 title: "Safari", | |
| 253 values: [ | |
| 254 {title: "iPad \u2014 iOS 9", value: "Mozilla/5.0 (iPad; CPU OS 9_1 l ike Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B137 Safari/601.1"}, | |
| 255 {title: "iPhone \u2014 iOS 9", value: "Mozilla/5.0 (iPhone; CPU iPho ne OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mo bile/13B137 Safari/601.1"} | |
| 256 ] | |
| 257 }, | |
| 258 { | |
| 259 title: "MeeGo", | |
| 260 values: [ | |
| 261 {title: "MeeGo \u2014 Nokia N9", value: "Mozilla/5.0 (MeeGo; NokiaN9 ) AppleWebKit/534.13 (KHTML, like Gecko) NokiaBrowser/8.5.0 Mobile Safari/534.13 "} | |
| 262 ] | |
| 263 }, | |
| 264 { | |
| 265 title: "Opera", | |
| 266 values: [ | |
| 267 {title: "Opera 33 \u2014 Mac", value: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Sa fari/537.36 OPR/33.0.1990.115"}, | |
| 268 {title: "Opera 33 \u2014 Windows", value: "Mozilla/5.0 (Windows NT 1 0.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.71 Safari/53 7.36 OPR/33.0.1990.43"}, | |
| 269 {title: "Opera 12 \u2014 Mac", value: "Opera/9.80 (Macintosh; Intel Mac OS X 10.9.1) Presto/2.12.388 Version/12.16"}, | |
| 270 {title: "Opera 12 \u2014 Windows", value: "Opera/9.80 (Windows NT 6. 1) Presto/2.12.388 Version/12.16"} | |
| 271 ] | |
| 272 }, | |
| 273 { | |
| 274 title: "Silk", | |
| 275 values: [ | |
| 276 {title: "Silk \u2014 Kindle Fire (Desktop view)", value: "Mozilla/5. 0 (Linux; U; en-us; KFTHWI Build/JDQ39) AppleWebKit/535.19 (KHTML, like Gecko) S ilk/3.13 Safari/535.19 Silk-Accelerated=true"}, | |
| 277 {title: "Silk \u2014 Kindle Fire (Mobile view)", value: "Mozilla/5.0 (Linux; U; Android 4.2.2; en-us; KFTHWI Build/JDQ39) AppleWebKit/535.19 (KHTML, like Gecko) Silk/3.13 Mobile Safari/535.19 Silk-Accelerated=true"} | |
| 278 ] | |
| 279 } | |
| 280 ] | |
| 212 | 281 |
| 213 /** | 282 /** |
| 214 * @constructor | 283 * @constructor |
| 215 * @implements {WebInspector.ActionDelegate} | 284 * @implements {WebInspector.ActionDelegate} |
| 216 */ | 285 */ |
| 217 WebInspector.NetworkConfigView.ShowActionDelegate = function() | 286 WebInspector.NetworkConfigView.ShowActionDelegate = function() |
| 218 { | 287 { |
| 219 } | 288 } |
| 220 | 289 |
| 221 WebInspector.NetworkConfigView.ShowActionDelegate.prototype = { | 290 WebInspector.NetworkConfigView.ShowActionDelegate.prototype = { |
| 222 /** | 291 /** |
| 223 * @override | 292 * @override |
| 224 * @param {!WebInspector.Context} context | 293 * @param {!WebInspector.Context} context |
| 225 * @param {string} actionId | 294 * @param {string} actionId |
| 226 * @return {boolean} | 295 * @return {boolean} |
| 227 */ | 296 */ |
| 228 handleAction: function(context, actionId) | 297 handleAction: function(context, actionId) |
| 229 { | 298 { |
| 230 WebInspector.inspectorView.showViewInDrawer("network.config"); | 299 WebInspector.inspectorView.showViewInDrawer("network.config"); |
| 231 return true; | 300 return true; |
| 232 } | 301 } |
| 233 } | 302 } |
| OLD | NEW |