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 1281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1292 } | 1292 } |
1293 contextMenu.appendItem(WebInspector.UIString.capitalize("Copy ^all as HA
R"), this._copyAll.bind(this)); | 1293 contextMenu.appendItem(WebInspector.UIString.capitalize("Copy ^all as HA
R"), this._copyAll.bind(this)); |
1294 | 1294 |
1295 contextMenu.appendSeparator(); | 1295 contextMenu.appendSeparator(); |
1296 contextMenu.appendItem(WebInspector.UIString.capitalize("Save as HAR wit
h ^content"), this._exportAll.bind(this)); | 1296 contextMenu.appendItem(WebInspector.UIString.capitalize("Save as HAR wit
h ^content"), this._exportAll.bind(this)); |
1297 | 1297 |
1298 contextMenu.appendSeparator(); | 1298 contextMenu.appendSeparator(); |
1299 contextMenu.appendItem(WebInspector.UIString.capitalize("Clear ^browser
^cache"), this._clearBrowserCache.bind(this)); | 1299 contextMenu.appendItem(WebInspector.UIString.capitalize("Clear ^browser
^cache"), this._clearBrowserCache.bind(this)); |
1300 contextMenu.appendItem(WebInspector.UIString.capitalize("Clear ^browser
^cookies"), this._clearBrowserCookies.bind(this)); | 1300 contextMenu.appendItem(WebInspector.UIString.capitalize("Clear ^browser
^cookies"), this._clearBrowserCookies.bind(this)); |
1301 | 1301 |
1302 var manager = WebInspector.multitargetNetworkManager; | 1302 var blockedSetting = WebInspector.moduleSetting("blockedURLs"); |
1303 if (Runtime.experiments.isEnabled("blockedURLs") && request && !manager.
blockedURLs().has(request.url)) { | 1303 if (request) { |
1304 contextMenu.appendSeparator(); | 1304 contextMenu.appendSeparator(); |
1305 contextMenu.appendItem(WebInspector.UIString.capitalize("Block ^requ
est URL"), manager.toggleURLBlocked.bind(manager, request.url)); | 1305 |
| 1306 var urlWithoutScheme = request.parsedURL.urlWithoutScheme(); |
| 1307 if (urlWithoutScheme && blockedSetting.get().indexOf(urlWithoutSchem
e) === -1) |
| 1308 contextMenu.appendItem(WebInspector.UIString.capitalize("Block ^
request URL"), addBlockedURL.bind(null, urlWithoutScheme)); |
| 1309 |
| 1310 var domain = request.parsedURL.domain(); |
| 1311 if (domain && blockedSetting.get().indexOf(domain) === -1) |
| 1312 contextMenu.appendItem(WebInspector.UIString.capitalize("Block ^
request ^domain"), addBlockedURL.bind(null, domain)); |
| 1313 |
| 1314 function addBlockedURL(url) |
| 1315 { |
| 1316 var list = blockedSetting.get(); |
| 1317 list.push(url); |
| 1318 blockedSetting.set(list); |
| 1319 } |
1306 } | 1320 } |
1307 | 1321 |
1308 if (request && request.resourceType() === WebInspector.resourceTypes.XHR
) { | 1322 if (request && request.resourceType() === WebInspector.resourceTypes.XHR
) { |
1309 contextMenu.appendSeparator(); | 1323 contextMenu.appendSeparator(); |
1310 contextMenu.appendItem(WebInspector.UIString("Replay XHR"), request.
replayXHR.bind(request)); | 1324 contextMenu.appendItem(WebInspector.UIString("Replay XHR"), request.
replayXHR.bind(request)); |
1311 contextMenu.appendSeparator(); | 1325 contextMenu.appendSeparator(); |
1312 } | 1326 } |
1313 | 1327 |
1314 contextMenu.show(); | 1328 contextMenu.show(); |
1315 }, | 1329 }, |
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2067 return false; | 2081 return false; |
2068 return true; | 2082 return true; |
2069 } | 2083 } |
2070 | 2084 |
2071 WebInspector.NetworkLogView.EventTypes = { | 2085 WebInspector.NetworkLogView.EventTypes = { |
2072 RequestSelected: "RequestSelected", | 2086 RequestSelected: "RequestSelected", |
2073 SearchCountUpdated: "SearchCountUpdated", | 2087 SearchCountUpdated: "SearchCountUpdated", |
2074 SearchIndexUpdated: "SearchIndexUpdated", | 2088 SearchIndexUpdated: "SearchIndexUpdated", |
2075 UpdateRequest: "UpdateRequest" | 2089 UpdateRequest: "UpdateRequest" |
2076 }; | 2090 }; |
OLD | NEW |