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/19 22:28:08
this is duplicate
luoe
2016/04/19 22:58:43
I believe this duplicate is actually needed for a
| |
| 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 customOverride = {title: WebInspector.UIString("Custom..."), value: We bInspector.NetworkConfigView.NonAgentValues.Custom}; |
| 98 for (var i = 0; i < userAgents.length; ++i) | 98 userAgentSelectElement.appendChild(new Option(customOverride.title, customOv erride.value)); |
| 99 userAgentSelectElement.add(new Option(userAgents[i].title, userAgents[i] .value)); | 99 |
| 100 var groups = WebInspector.NetworkConfigView._userAgentGroups; | |
| 101 for (var i = 0; i < groups.length; ++i) { | |
|
lushnikov
2016/04/19 22:28:08
I would avoid using i/j indexes here and use some
luoe
2016/04/19 22:58:43
Sounds good
luoe
2016/04/20 22:07:09
Done.
| |
| 102 var group = groups[i].value; | |
| 103 var groupElement = userAgentSelectElement.createChild("optgroup"); | |
| 104 groupElement.label = groups[i].title; | |
| 105 for (var j = 0; j < group.length; ++j) { | |
| 106 groupElement.appendChild(new Option(group[j].title, group[j].value)) ; | |
| 107 } | |
| 108 } | |
| 109 | |
| 100 userAgentSelectElement.selectedIndex = 0; | 110 userAgentSelectElement.selectedIndex = 0; |
| 101 | 111 |
| 102 var otherUserAgentElement = createElement("input"); | 112 var otherUserAgentElement = createElement("input"); |
| 103 otherUserAgentElement.type = "text"; | 113 otherUserAgentElement.type = "text"; |
| 104 otherUserAgentElement.value = userAgentSetting.get(); | 114 otherUserAgentElement.value = userAgentSetting.get(); |
| 105 otherUserAgentElement.title = userAgentSetting.get(); | 115 otherUserAgentElement.title = userAgentSetting.get(); |
| 106 | 116 |
| 107 settingChanged(); | 117 settingChanged(); |
| 108 userAgentSelectElement.addEventListener("change", userAgentSelected, false); | 118 userAgentSelectElement.addEventListener("change", userAgentSelected, false); |
| 109 | 119 |
| 110 otherUserAgentElement.addEventListener("dblclick", textDoubleClicked, true); | 120 otherUserAgentElement.addEventListener("dblclick", textDoubleClicked, true); |
| 111 otherUserAgentElement.addEventListener("blur", textChanged, false); | 121 otherUserAgentElement.addEventListener("blur", textChanged, false); |
| 112 otherUserAgentElement.addEventListener("keydown", textKeyDown, false); | 122 otherUserAgentElement.addEventListener("keydown", textKeyDown, false); |
| 113 | 123 |
| 124 function indexOfAgent(agentValue) | |
|
lushnikov
2016/04/19 22:28:08
please add jsdoc
luoe
2016/04/19 22:58:43
Will do
luoe
2016/04/20 22:07:09
Done.
| |
| 125 { | |
| 126 var agentValues = Array.prototype.map.call(userAgentSelectElement.option s, x => x.value); | |
| 127 var agentIndex = agentValues.indexOf(agentValue); | |
| 128 return agentIndex; | |
| 129 } | |
| 130 | |
| 114 function userAgentSelected() | 131 function userAgentSelected() |
| 115 { | 132 { |
| 116 var value = userAgentSelectElement.options[userAgentSelectElement.select edIndex].value; | 133 var value = userAgentSelectElement.options[userAgentSelectElement.select edIndex].value; |
| 117 if (value !== customOverride.value) { | 134 if (value !== customOverride.value) { |
| 118 userAgentSetting.set(value); | 135 userAgentSetting.set(value); |
| 119 otherUserAgentElement.value = value; | 136 otherUserAgentElement.value = value; |
| 120 otherUserAgentElement.title = value; | 137 otherUserAgentElement.title = value; |
| 121 otherUserAgentElement.readOnly = true; | 138 otherUserAgentElement.readOnly = true; |
| 122 } else { | 139 } else { |
| 123 otherUserAgentElement.readOnly = false; | 140 otherUserAgentElement.readOnly = false; |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 134 for (var i = 0; i < options.length; ++i) { | 151 for (var i = 0; i < options.length; ++i) { |
| 135 if (options[i].value === value) { | 152 if (options[i].value === value) { |
| 136 userAgentSelectElement.selectedIndex = i; | 153 userAgentSelectElement.selectedIndex = i; |
| 137 selectionRestored = true; | 154 selectionRestored = true; |
| 138 break; | 155 break; |
| 139 } | 156 } |
| 140 } | 157 } |
| 141 | 158 |
| 142 otherUserAgentElement.readOnly = selectionRestored; | 159 otherUserAgentElement.readOnly = selectionRestored; |
| 143 if (!selectionRestored) | 160 if (!selectionRestored) |
| 144 userAgentSelectElement.selectedIndex = options.length - 1; | 161 userAgentSelectElement.selectedIndex = indexOfAgent(WebInspector.Net workConfigView.NonAgentValues.Custom); |
|
lushnikov
2016/04/19 22:28:08
this function is called with Custom value as an ar
luoe
2016/04/19 22:58:43
We sure can!
luoe
2016/04/20 22:07:09
Done.
| |
| 145 | 162 |
| 146 if (otherUserAgentElement.value !== value) { | 163 if (otherUserAgentElement.value !== value) { |
| 147 otherUserAgentElement.value = value; | 164 otherUserAgentElement.value = value; |
| 148 otherUserAgentElement.title = value; | 165 otherUserAgentElement.title = value; |
| 149 } | 166 } |
| 150 } | 167 } |
| 151 | 168 |
| 152 function textKeyDown(event) | 169 function textKeyDown(event) |
| 153 { | 170 { |
| 154 if (isEnterKey(event)) | 171 if (isEnterKey(event)) |
| 155 textChanged(); | 172 textChanged(); |
| 156 } | 173 } |
| 157 | 174 |
| 158 function textDoubleClicked() | 175 function textDoubleClicked() |
| 159 { | 176 { |
| 160 if (userAgentSelectElement.selectedIndex === userAgents.length - 1) | 177 var customIndex = indexOfAgent(WebInspector.NetworkConfigView.NonAgentVa lues.Custom); |
| 178 if (userAgentSelectElement.selectedIndex === customIndex) | |
| 161 return; | 179 return; |
| 162 userAgentSelectElement.selectedIndex = userAgents.length - 1; | 180 userAgentSelectElement.selectedIndex = customIndex; |
| 163 userAgentSelected(); | 181 userAgentSelected(); |
| 164 } | 182 } |
| 165 | 183 |
| 166 function textChanged() | 184 function textChanged() |
| 167 { | 185 { |
| 168 if (userAgentSetting.get() !== otherUserAgentElement.value) { | 186 if (userAgentSetting.get() !== otherUserAgentElement.value) { |
| 169 userAgentSetting.set(otherUserAgentElement.value); | 187 userAgentSetting.set(otherUserAgentElement.value); |
| 170 settingChanged(); | 188 settingChanged(); |
| 171 } | 189 } |
| 172 } | 190 } |
| 173 | 191 |
| 174 return { select: userAgentSelectElement, input: otherUserAgentElement }; | 192 return { select: userAgentSelectElement, input: otherUserAgentElement }; |
| 175 } | 193 } |
| 176 | 194 |
| 177 /** @type {!Array.<{title: string, value: string}>} */ | 195 WebInspector.NetworkConfigView.NonAgentValues = { |
| 178 WebInspector.NetworkConfigView._userAgents = [ | 196 "Custom": "custom" |
| 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"}, | 197 }; |
| 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"}, | 198 |
| 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+"}, | 199 /** @type {!Array.<{title: string, value: !Array.<{title: string, value: string} >}>} */ |
| 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+"}, | 200 WebInspector.NetworkConfigView._userAgentGroups = [ |
| 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+"}, | 201 { |
| 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"}, | 202 title: "Android", |
|
lushnikov
2016/04/19 22:28:08
is this just a pretty-print? no changes here?
luoe
2016/04/19 22:58:43
a few changes here:
- alphabetic reordering
- remo
luoe
2016/04/20 22:07:09
Done.
| |
| 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"}, | 203 value: [ |
| 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"}, | 204 {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"}, |
| 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"}, | 205 {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"} |
| 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"}, | 206 ] |
| 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"}, | 207 }, |
| 190 {title: "Firefox 42 \u2014 Android Mobile", value: "Mozilla/5.0 (Android 4.4 ; Mobile; rv:42.0) Gecko/42.0 Firefox/42.0"}, | 208 { |
| 191 {title: "Firefox 42 \u2014 Android Tablet", value: "Mozilla/5.0 (Android 4.4 ; Tablet; rv:42.0) Gecko/42.0 Firefox/42.0"}, | 209 title: "Chrome", |
| 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"}, | 210 value: [ |
| 193 {title: "Firefox 42 \u2014 Windows", value: "Mozilla/5.0 (Windows NT 10.0; W OW64; rv:42.0) Gecko/20100101 Firefox/42.0"}, | 211 {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"}, |
| 194 {title: "Googlebot", value: "Mozilla/5.0 (compatible; Googlebot/2.1; +http:/ /www.google.com/bot.html)"}, | 212 {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"}, |
| 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)"}, | 213 {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"}, |
| 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"}, | 214 {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"}, |
| 197 {title: "Internet Explorer 11", value: "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko"}, | 215 {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"}, |
| 198 {title: "Internet Explorer 10", value: "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)"}, | 216 {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"} |
| 199 {title: "Internet Explorer 8", value: "Mozilla/4.0 (compatible; MSIE 8.0; Wi ndows NT 6.0; Trident/4.0)"}, | 217 ] |
| 200 {title: "Internet Explorer 9", value: "Mozilla/5.0 (compatible; MSIE 9.0; Wi ndows NT 6.1; Trident/5.0)"}, | 218 }, |
| 201 {title: "Internet Explorer 7", value: "Mozilla/4.0 (compatible; MSIE 7.0; Wi ndows NT 6.0)"}, | 219 { |
| 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"}, | 220 title: "Edge", |
| 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"}, | 221 value: [ |
| 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"}, | 222 {title: "Edge \u2014 Windows", 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/12.10240"}, |
| 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"}, | 223 {title: "Edge \u2014 Mobile", value: "Mozilla/5.0 (Windows Phone 10. 0; Android 4.2.1; Microsoft; Lumia 640 XL LTE) AppleWebKit/537.36 (KHTML, like G ecko) Chrome/42.0.2311.135 Mobile Safari/537.36 Edge/12.10166"}, |
| 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"}, | 224 {title: "Edge \u2014 XBox", value: "Mozilla/5.0 (Windows NT 10.0; Wi n64; x64; Xbox; Xbox One) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.231 1.135 Safari/537.36 Edge/13.10586"} |
| 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"}, | 225 ] |
| 208 {title: "Opera 12 \u2014 Windows", value: "Opera/9.80 (Windows NT 6.1) Prest o/2.12.388 Version/12.16"}, | 226 }, |
| 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"}, | 227 { |
| 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"} | 228 title: "Firefox", |
| 211 ]; | 229 value: [ |
| 230 {title: "Firefox 42 \u2014 Android Mobile", value: "Mozilla/5.0 (And roid 4.4; Mobile; rv:42.0) Gecko/42.0 Firefox/42.0"}, | |
| 231 {title: "Firefox 42 \u2014 Android Tablet", value: "Mozilla/5.0 (And roid 4.4; Tablet; rv:42.0) Gecko/42.0 Firefox/42.0"}, | |
| 232 {title: "Firefox 42 \u2014 iPhone", value: "Mozilla/5.0 (iPhone; CPU iPhone OS 8_3 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) FxiOS/1.0 Mobile/12F69 Safari/600.1.4"}, | |
| 233 {title: "Firefox 42 \u2014 iPad", value: "Mozilla/5.0 (iPad; CPU iPh one OS 8_3 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) FxiOS/1.0 Mobi le/12F69 Safari/600.1.4"}, | |
| 234 {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"}, | |
| 235 {title: "Firefox 42 \u2014 Windows", value: "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0"} | |
| 236 ] | |
| 237 }, | |
| 238 { | |
| 239 title: "Googlebot", | |
| 240 value: [ | |
| 241 {title: "Googlebot", value: "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"}, | |
| 242 {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)"} | |
| 243 ] | |
| 244 }, | |
| 245 { | |
| 246 title: "Internet", | |
| 247 value: [ | |
| 248 {title: "Internet Explorer 7", value: "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)"}, | |
| 249 {title: "Internet Explorer 8", value: "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0)"}, | |
| 250 {title: "Internet Explorer 9", value: "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)"}, | |
| 251 {title: "Internet Explorer 10", value: "Mozilla/5.0 (compatible; MSI E 10.0; Windows NT 6.1; WOW64; Trident/6.0)"}, | |
| 252 {title: "Internet Explorer 11", value: "Mozilla/5.0 (Windows NT 10.0 ; WOW64; Trident/7.0; rv:11.0) like Gecko"} | |
| 253 ] | |
| 254 }, | |
| 255 { | |
| 256 title: "Opera", | |
| 257 value: [ | |
| 258 {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"}, | |
| 259 {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"}, | |
| 260 {title: "Opera 12 \u2014 Mac", value: "Opera/9.80 (Macintosh; Intel Mac OS X 10.9.1) Presto/2.12.388 Version/12.16"}, | |
| 261 {title: "Opera 12 \u2014 Windows", value: "Opera/9.80 (Windows NT 6. 1) Presto/2.12.388 Version/12.16"}, | |
| 262 {title: "Opera Mobile \u2014 Android Mobile", value: "Opera/12.02 (A ndroid 4.1; Linux; Opera Mobi/ADR-1111101157; U; en-US) Presto/2.9.201 Version/1 2.02"}, | |
| 263 {title: "Opera Mini \u2014 iOS", value: "Opera/9.80 (iPhone; Opera M ini/8.0.0/34.2336; U; en) Presto/2.8.119 Version/11.10"}, | |
| 264 {title: "Opera Mobile (Turbo) \u2014 iOS", value: "Mozilla/5.0 (iPho ne; CPU iPhone OS 7_1_1 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) OPiOS/8.0.0.78129 Mobile/11D201 Safari/9537.53"} | |
| 265 ] | |
| 266 }, | |
| 267 { | |
| 268 title: "Safari", | |
| 269 value: [ | |
| 270 {title: "Safari \u2014 iPad iOS 9", value: "Mozilla/5.0 (iPad; CPU O S 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile /13B137 Safari/601.1"}, | |
| 271 {title: "Safari \u2014 iPhone iOS 9", value: "Mozilla/5.0 (iPhone; C PU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version /9.0 Mobile/13B137 Safari/601.1"}, | |
| 272 {title: "Safari \u2014 Mac", value: "Mozilla/5.0 (Macintosh; Intel M ac OS X 10_9_3) AppleWebKit/537.75.14 (KHTML, like Gecko) Version/7.0.3 Safari/7 046A194A"} | |
| 273 ] | |
| 274 } | |
| 275 ] | |
| 212 | 276 |
| 213 /** | 277 /** |
| 214 * @constructor | 278 * @constructor |
| 215 * @implements {WebInspector.ActionDelegate} | 279 * @implements {WebInspector.ActionDelegate} |
| 216 */ | 280 */ |
| 217 WebInspector.NetworkConfigView.ShowActionDelegate = function() | 281 WebInspector.NetworkConfigView.ShowActionDelegate = function() |
| 218 { | 282 { |
| 219 } | 283 } |
| 220 | 284 |
| 221 WebInspector.NetworkConfigView.ShowActionDelegate.prototype = { | 285 WebInspector.NetworkConfigView.ShowActionDelegate.prototype = { |
| 222 /** | 286 /** |
| 223 * @override | 287 * @override |
| 224 * @param {!WebInspector.Context} context | 288 * @param {!WebInspector.Context} context |
| 225 * @param {string} actionId | 289 * @param {string} actionId |
| 226 * @return {boolean} | 290 * @return {boolean} |
| 227 */ | 291 */ |
| 228 handleAction: function(context, actionId) | 292 handleAction: function(context, actionId) |
| 229 { | 293 { |
| 230 WebInspector.inspectorView.showViewInDrawer("network.config"); | 294 WebInspector.inspectorView.showViewInDrawer("network.config"); |
| 231 return true; | 295 return true; |
| 232 } | 296 } |
| 233 } | 297 } |
| OLD | NEW |