Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sdk/NetworkManager.js

Issue 2739323003: DevTools protocol interception, blocking & modification of requests (Closed)
Patch Set: Add a comment Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/inspector/inspector_protocol_config.json ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 * @param {string} data 594 * @param {string} data
595 */ 595 */
596 eventSourceMessageReceived(requestId, time, eventName, eventId, data) { 596 eventSourceMessageReceived(requestId, time, eventName, eventId, data) {
597 var networkRequest = this._inflightRequestsById[requestId]; 597 var networkRequest = this._inflightRequestsById[requestId];
598 if (!networkRequest) 598 if (!networkRequest)
599 return; 599 return;
600 networkRequest.addEventSourceMessage(time, eventName, eventId, data); 600 networkRequest.addEventSourceMessage(time, eventName, eventId, data);
601 } 601 }
602 602
603 /** 603 /**
604 * @override
605 * @param {!Protocol.Network.RequestId} requestId
606 * @param {!Protocol.Network.Request} request
607 * @param {!Protocol.Network.Headers=} redirectHeaders
608 * @param {number=} redirectStatusCode
609 * @param {string=} redirectUrl
610 */
611 requestIntercepted(requestId, request, redirectHeaders, redirectStatusCode, re directUrl) {
612 // Stub implementation. Event not currently used by the frontend.
613 }
614
615 /**
604 * @param {!Protocol.Network.RequestId} requestId 616 * @param {!Protocol.Network.RequestId} requestId
605 * @param {!Protocol.Network.Timestamp} time 617 * @param {!Protocol.Network.Timestamp} time
606 * @param {string} redirectURL 618 * @param {string} redirectURL
607 * @return {!SDK.NetworkRequest} 619 * @return {!SDK.NetworkRequest}
608 */ 620 */
609 _appendRedirect(requestId, time, redirectURL) { 621 _appendRedirect(requestId, time, redirectURL) {
610 var originalNetworkRequest = this._inflightRequestsById[requestId]; 622 var originalNetworkRequest = this._inflightRequestsById[requestId];
611 var previousRedirects = originalNetworkRequest.redirects || []; 623 var previousRedirects = originalNetworkRequest.redirects || [];
612 originalNetworkRequest.setRequestId(requestId + ':redirected.' + previousRed irects.length); 624 originalNetworkRequest.setRequestId(requestId + ':redirected.' + previousRed irects.length);
613 delete originalNetworkRequest.redirects; 625 delete originalNetworkRequest.redirects;
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
928 SDK.MultitargetNetworkManager.Events = { 940 SDK.MultitargetNetworkManager.Events = {
929 BlockedPatternsChanged: Symbol('BlockedPatternsChanged'), 941 BlockedPatternsChanged: Symbol('BlockedPatternsChanged'),
930 ConditionsChanged: Symbol('ConditionsChanged'), 942 ConditionsChanged: Symbol('ConditionsChanged'),
931 UserAgentChanged: Symbol('UserAgentChanged') 943 UserAgentChanged: Symbol('UserAgentChanged')
932 }; 944 };
933 945
934 /** 946 /**
935 * @type {!SDK.MultitargetNetworkManager} 947 * @type {!SDK.MultitargetNetworkManager}
936 */ 948 */
937 SDK.multitargetNetworkManager; 949 SDK.multitargetNetworkManager;
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/inspector/inspector_protocol_config.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698