| 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 { |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 | 107 |
| 108 userAgentSelectElement.selectedIndex = 0; | 108 userAgentSelectElement.selectedIndex = 0; |
| 109 | 109 |
| 110 var otherUserAgentElement = createElement("input"); | 110 var otherUserAgentElement = createElement("input"); |
| 111 otherUserAgentElement.type = "text"; | 111 otherUserAgentElement.type = "text"; |
| 112 otherUserAgentElement.value = userAgentSetting.get(); | 112 otherUserAgentElement.value = userAgentSetting.get(); |
| 113 otherUserAgentElement.title = userAgentSetting.get(); | 113 otherUserAgentElement.title = userAgentSetting.get(); |
| 114 | 114 |
| 115 settingChanged(); | 115 settingChanged(); |
| 116 userAgentSelectElement.addEventListener("change", userAgentSelected, false); | 116 userAgentSelectElement.addEventListener("change", userAgentSelected, false); |
| 117 | 117 otherUserAgentElement.addEventListener("input", textChanged, false); |
| 118 otherUserAgentElement.addEventListener("blur", textChanged, false); | |
| 119 otherUserAgentElement.addEventListener("keyup", textChanged, false); | |
| 120 | 118 |
| 121 function userAgentSelected() | 119 function userAgentSelected() |
| 122 { | 120 { |
| 123 var value = userAgentSelectElement.options[userAgentSelectElement.select
edIndex].value; | 121 var value = userAgentSelectElement.options[userAgentSelectElement.select
edIndex].value; |
| 124 if (value !== customOverride.value) { | 122 if (value !== customOverride.value) { |
| 125 userAgentSetting.set(value); | 123 userAgentSetting.set(value); |
| 126 otherUserAgentElement.value = value; | 124 otherUserAgentElement.value = value; |
| 127 otherUserAgentElement.title = value; | 125 otherUserAgentElement.title = value; |
| 128 } else { | 126 } else { |
| 129 otherUserAgentElement.select(); | 127 otherUserAgentElement.select(); |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 * @param {!WebInspector.Context} context | 257 * @param {!WebInspector.Context} context |
| 260 * @param {string} actionId | 258 * @param {string} actionId |
| 261 * @return {boolean} | 259 * @return {boolean} |
| 262 */ | 260 */ |
| 263 handleAction: function(context, actionId) | 261 handleAction: function(context, actionId) |
| 264 { | 262 { |
| 265 WebInspector.inspectorView.showViewInDrawer("network.config"); | 263 WebInspector.inspectorView.showViewInDrawer("network.config"); |
| 266 return true; | 264 return true; |
| 267 } | 265 } |
| 268 } | 266 } |
| OLD | NEW |