| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008, 2009 Anthony Ricaud <rik@webkit.org> | 3 * Copyright (C) 2008, 2009 Anthony Ricaud <rik@webkit.org> |
| 4 * Copyright (C) 2011 Google Inc. All rights reserved. | 4 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * | 9 * |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 990 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1001 var request = gridNode && gridNode._request; | 1001 var request = gridNode && gridNode._request; |
| 1002 | 1002 |
| 1003 if (request) { | 1003 if (request) { |
| 1004 contextMenu.appendItem(WebInspector.openLinkExternallyLabel(), WebIn
spector.openResource.bind(WebInspector, request.url, false)); | 1004 contextMenu.appendItem(WebInspector.openLinkExternallyLabel(), WebIn
spector.openResource.bind(WebInspector, request.url, false)); |
| 1005 contextMenu.appendSeparator(); | 1005 contextMenu.appendSeparator(); |
| 1006 contextMenu.appendItem(WebInspector.copyLinkAddressLabel(), this._co
pyLocation.bind(this, request)); | 1006 contextMenu.appendItem(WebInspector.copyLinkAddressLabel(), this._co
pyLocation.bind(this, request)); |
| 1007 if (request.requestHeadersText()) | 1007 if (request.requestHeadersText()) |
| 1008 contextMenu.appendItem(WebInspector.UIString(WebInspector.useLow
erCaseMenuTitles() ? "Copy request headers" : "Copy Request Headers"), this._cop
yRequestHeaders.bind(this, request)); | 1008 contextMenu.appendItem(WebInspector.UIString(WebInspector.useLow
erCaseMenuTitles() ? "Copy request headers" : "Copy Request Headers"), this._cop
yRequestHeaders.bind(this, request)); |
| 1009 if (request.responseHeadersText) | 1009 if (request.responseHeadersText) |
| 1010 contextMenu.appendItem(WebInspector.UIString(WebInspector.useLow
erCaseMenuTitles() ? "Copy response headers" : "Copy Response Headers"), this._c
opyResponseHeaders.bind(this, request)); | 1010 contextMenu.appendItem(WebInspector.UIString(WebInspector.useLow
erCaseMenuTitles() ? "Copy response headers" : "Copy Response Headers"), this._c
opyResponseHeaders.bind(this, request)); |
| 1011 if (request.finished) |
| 1012 contextMenu.appendItem(WebInspector.UIString(WebInspector.useLow
erCaseMenuTitles() ? "Copy response" : "Copy Response"), this._copyResponse.bind
(this, request)); |
| 1011 contextMenu.appendItem(WebInspector.UIString("Copy as cURL"), this._
copyCurlCommand.bind(this, request)); | 1013 contextMenu.appendItem(WebInspector.UIString("Copy as cURL"), this._
copyCurlCommand.bind(this, request)); |
| 1012 } | 1014 } |
| 1013 contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMe
nuTitles() ? "Copy all as HAR" : "Copy All as HAR"), this._copyAll.bind(this)); | 1015 contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMe
nuTitles() ? "Copy all as HAR" : "Copy All as HAR"), this._copyAll.bind(this)); |
| 1014 | 1016 |
| 1015 contextMenu.appendSeparator(); | 1017 contextMenu.appendSeparator(); |
| 1016 contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMe
nuTitles() ? "Save as HAR with content" : "Save as HAR with Content"), this._exp
ortAll.bind(this)); | 1018 contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMe
nuTitles() ? "Save as HAR with content" : "Save as HAR with Content"), this._exp
ortAll.bind(this)); |
| 1017 | 1019 |
| 1018 contextMenu.appendSeparator(); | 1020 contextMenu.appendSeparator(); |
| 1019 contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMe
nuTitles() ? "Clear browser cache" : "Clear Browser Cache"), this._clearBrowserC
ache.bind(this)); | 1021 contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMe
nuTitles() ? "Clear browser cache" : "Clear Browser Cache"), this._clearBrowserC
ache.bind(this)); |
| 1020 contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMe
nuTitles() ? "Clear browser cookies" : "Clear Browser Cookies"), this._clearBrow
serCookies.bind(this)); | 1022 contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMe
nuTitles() ? "Clear browser cookies" : "Clear Browser Cookies"), this._clearBrow
serCookies.bind(this)); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 1050 _copyLocation: function(request) | 1052 _copyLocation: function(request) |
| 1051 { | 1053 { |
| 1052 InspectorFrontendHost.copyText(request.url); | 1054 InspectorFrontendHost.copyText(request.url); |
| 1053 }, | 1055 }, |
| 1054 | 1056 |
| 1055 _copyRequestHeaders: function(request) | 1057 _copyRequestHeaders: function(request) |
| 1056 { | 1058 { |
| 1057 InspectorFrontendHost.copyText(request.requestHeadersText()); | 1059 InspectorFrontendHost.copyText(request.requestHeadersText()); |
| 1058 }, | 1060 }, |
| 1059 | 1061 |
| 1062 _copyResponse: function(request) |
| 1063 { |
| 1064 function callback(content) |
| 1065 { |
| 1066 if (request.contentEncoded) |
| 1067 content = request.asDataURL(); |
| 1068 InspectorFrontendHost.copyText(content || ""); |
| 1069 } |
| 1070 request.requestContent(callback); |
| 1071 }, |
| 1072 |
| 1060 _copyResponseHeaders: function(request) | 1073 _copyResponseHeaders: function(request) |
| 1061 { | 1074 { |
| 1062 InspectorFrontendHost.copyText(request.responseHeadersText); | 1075 InspectorFrontendHost.copyText(request.responseHeadersText); |
| 1063 }, | 1076 }, |
| 1064 | 1077 |
| 1065 /** | 1078 /** |
| 1066 * @param {!WebInspector.NetworkRequest} request | 1079 * @param {!WebInspector.NetworkRequest} request |
| 1067 */ | 1080 */ |
| 1068 _copyCurlCommand: function(request) | 1081 _copyCurlCommand: function(request) |
| 1069 { | 1082 { |
| (...skipping 1610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2680 WebInspector.NetworkDataGridNode.RequestPropertyComparator = function(propertyNa
me, revert, a, b) | 2693 WebInspector.NetworkDataGridNode.RequestPropertyComparator = function(propertyNa
me, revert, a, b) |
| 2681 { | 2694 { |
| 2682 var aValue = a._request[propertyName]; | 2695 var aValue = a._request[propertyName]; |
| 2683 var bValue = b._request[propertyName]; | 2696 var bValue = b._request[propertyName]; |
| 2684 if (aValue > bValue) | 2697 if (aValue > bValue) |
| 2685 return revert ? -1 : 1; | 2698 return revert ? -1 : 1; |
| 2686 if (bValue > aValue) | 2699 if (bValue > aValue) |
| 2687 return revert ? 1 : -1; | 2700 return revert ? 1 : -1; |
| 2688 return 0; | 2701 return 0; |
| 2689 } | 2702 } |
| OLD | NEW |