Chromium Code Reviews| Index: Source/devtools/front_end/NetworkPanel.js |
| diff --git a/Source/devtools/front_end/NetworkPanel.js b/Source/devtools/front_end/NetworkPanel.js |
| index 99232bba2a7e6417fe46b7c1ca219ed38202b66b..36a990efa4fe4f568b308961e889a32717f86a60 100644 |
| --- a/Source/devtools/front_end/NetworkPanel.js |
| +++ b/Source/devtools/front_end/NetworkPanel.js |
| @@ -93,7 +93,7 @@ WebInspector.NetworkLogView = function(filterBar, coulmnsVisibilitySetting) |
| WebInspector.NetworkLogView.HTTPSchemas = {"http": true, "https": true, "ws": true, "wss": true}; |
| WebInspector.NetworkLogView._responseHeaderColumns = ["Cache-Control", "Connection", "Content-Encoding", "Content-Length", "ETag", "Keep-Alive", "Last-Modified", "Server", "Vary"]; |
| WebInspector.NetworkLogView._defaultColumnsVisibility = { |
| - method: true, status: true, scheme: false, domain: false, type: true, initiator: true, cookies: false, setCookies: false, size: true, time: true, |
| + method: true, status: true, scheme: false, domain: false, remoteAddress: false, type: true, initiator: true, cookies: false, setCookies: false, size: true, time: true, |
| "Cache-Control": false, "Connection": false, "Content-Encoding": false, "Content-Length": false, "ETag": false, "Keep-Alive": false, "Last-Modified": false, "Server": false, "Vary": false |
| }; |
| WebInspector.NetworkLogView._defaultRefreshDelay = 500; |
| @@ -227,6 +227,14 @@ WebInspector.NetworkLogView.prototype = { |
| }); |
| columns.push({ |
| + id: "remoteAddress", |
| + title: WebInspector.UIString("Remote Address"), |
| + sortable: true, |
| + weight: 10, |
| + align: WebInspector.DataGrid.Align.Right |
| + }); |
| + |
| + columns.push({ |
| id: "type", |
| title: WebInspector.UIString("Type"), |
| sortable: true, |
| @@ -370,6 +378,7 @@ WebInspector.NetworkLogView.prototype = { |
| this._sortingFunctions.status = WebInspector.NetworkDataGridNode.RequestPropertyComparator.bind(null, "statusCode", false); |
| this._sortingFunctions.scheme = WebInspector.NetworkDataGridNode.RequestPropertyComparator.bind(null, "scheme", false); |
| this._sortingFunctions.domain = WebInspector.NetworkDataGridNode.RequestPropertyComparator.bind(null, "domain", false); |
| + this._sortingFunctions.type = WebInspector.NetworkDataGridNode.RemoteAddressComparator; |
|
Peter Beverloo
2014/01/27 19:03:26
drive-by: s/type/remoteAddress/
eustas
2014/01/28 10:41:10
Done. Thanks.
|
| this._sortingFunctions.type = WebInspector.NetworkDataGridNode.RequestPropertyComparator.bind(null, "mimeType", false); |
| this._sortingFunctions.initiator = WebInspector.NetworkDataGridNode.InitiatorComparator; |
| this._sortingFunctions.cookies = WebInspector.NetworkDataGridNode.RequestCookiesCountComparator; |
| @@ -2166,6 +2175,7 @@ WebInspector.NetworkDataGridNode.prototype = { |
| this._statusCell = this._createDivInTD("status"); |
| this._schemeCell = this._createDivInTD("scheme"); |
| this._domainCell = this._createDivInTD("domain"); |
| + this._remoteAddressCell = this._createDivInTD("remoteAddress"); |
| this._typeCell = this._createDivInTD("type"); |
| this._initiatorCell = this._createDivInTD("initiator"); |
| this._cookiesCell = this._createDivInTD("cookies"); |
| @@ -2281,6 +2291,7 @@ WebInspector.NetworkDataGridNode.prototype = { |
| this._refreshStatusCell(); |
| this._refreshSchemeCell(); |
| this._refreshDomainCell(); |
| + this._refreshRemoteAddressCell(); |
| this._refreshTypeCell(); |
| this._refreshInitiatorCell(); |
| this._refreshCookiesCell(); |
| @@ -2393,6 +2404,11 @@ WebInspector.NetworkDataGridNode.prototype = { |
| this._domainCell.setTextAndTitle(this._request.domain); |
| }, |
| + _refreshRemoteAddressCell: function() |
| + { |
| + this._remoteAddressCell.setTextAndTitle(this._request.remoteAddress()); |
| + }, |
| + |
| _refreshTypeCell: function() |
| { |
| if (this._request.mimeType) { |
| @@ -2598,6 +2614,17 @@ WebInspector.NetworkDataGridNode.NameComparator = function(a, b) |
| return 0; |
| } |
| +WebInspector.NetworkDataGridNode.RemoteAddressComparator = function(a, b) |
| +{ |
| + var aRemoteAddress = a._request.remoteAddress(); |
| + var bRemoteAddress = b._request.remoteAddress(); |
| + if (aRemoteAddress > bRemoteAddress) |
| + return 1; |
| + if (bRemoteAddress > aRemoteAddress) |
| + return -1; |
| + return 0; |
| +} |
| + |
| WebInspector.NetworkDataGridNode.SizeComparator = function(a, b) |
| { |
| if (b._request.cached && !a._request.cached) |