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

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

Issue 2109813003: [DevTools] No NetworkManager and NetworkLog for v8only mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed review comments Created 4 years, 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 1106 matching lines...) Expand 10 before | Expand all | Expand 10 after
1117 this._initiatorInfo = {type: type, url: url, lineNumber: lineNumber, col umnNumber: columnNumber, scriptId: scriptId}; 1117 this._initiatorInfo = {type: type, url: url, lineNumber: lineNumber, col umnNumber: columnNumber, scriptId: scriptId};
1118 return this._initiatorInfo; 1118 return this._initiatorInfo;
1119 }, 1119 },
1120 1120
1121 /** 1121 /**
1122 * @return {?WebInspector.NetworkRequest} 1122 * @return {?WebInspector.NetworkRequest}
1123 */ 1123 */
1124 initiatorRequest: function() 1124 initiatorRequest: function()
1125 { 1125 {
1126 if (this._initiatorRequest === undefined) 1126 if (this._initiatorRequest === undefined)
1127 this._initiatorRequest = this.target().networkLog.requestForURL(this .initiatorInfo().url); 1127 this._initiatorRequest = WebInspector.NetworkLog.fromTarget(this.tar get()).requestForURL(this.initiatorInfo().url);
dgozman 2016/06/30 17:24:33 this.networkLog()
eostroukhov-old 2016/06/30 21:38:28 Done.
1128 return this._initiatorRequest; 1128 return this._initiatorRequest;
1129 }, 1129 },
1130 1130
1131 /** 1131 /**
1132 * @return {!Set<!WebInspector.NetworkRequest>} 1132 * @return {!Set<!WebInspector.NetworkRequest>}
1133 */ 1133 */
1134 initiatorChain: function() 1134 initiatorChain: function()
1135 { 1135 {
1136 if (this._initiatorChain) 1136 if (this._initiatorChain)
1137 return this._initiatorChain; 1137 return this._initiatorChain;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
1200 var message = {time: this.pseudoWallTime(time), eventName: eventName, ev entId: eventId, data: data}; 1200 var message = {time: this.pseudoWallTime(time), eventName: eventName, ev entId: eventId, data: data};
1201 this._eventSourceMessages.push(message); 1201 this._eventSourceMessages.push(message);
1202 this.dispatchEventToListeners(WebInspector.NetworkRequest.Events.EventSo urceMessageAdded, message); 1202 this.dispatchEventToListeners(WebInspector.NetworkRequest.Events.EventSo urceMessageAdded, message);
1203 }, 1203 },
1204 1204
1205 replayXHR: function() 1205 replayXHR: function()
1206 { 1206 {
1207 this.target().networkAgent().replayXHR(this.requestId); 1207 this.target().networkAgent().replayXHR(this.requestId);
1208 }, 1208 },
1209 1209
1210 /**
1211 * @return {!WebInspector.NetworkLog}
1212 */
1213 get networkLog()
dgozman 2016/06/30 17:24:33 Make it a function. Getters are banned, the remain
eostroukhov-old 2016/06/30 21:38:28 Done.
1214 {
1215 var networkLog = WebInspector.NetworkLog.fromTarget(this.target());
dgozman 2016/06/30 17:24:33 Let's instead save it into a field in constructor.
eostroukhov-old 2016/06/30 21:38:28 Done.
1216 return console.assert(networkLog);
1217 },
1218
1210 __proto__: WebInspector.SDKObject.prototype 1219 __proto__: WebInspector.SDKObject.prototype
1211 } 1220 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698