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

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

Issue 2168323002: [DevTools] Explicitly require ResourceTreeModel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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) 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 14 matching lines...) Expand all
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 /** 31 /**
32 * @constructor 32 * @constructor
33 * @extends {WebInspector.SDKModel} 33 * @extends {WebInspector.SDKModel}
34 * @param {!WebInspector.Target} target 34 * @param {!WebInspector.Target} target
35 * @param {!WebInspector.ResourceTreeModel} resourceTreeModel
35 * @param {!WebInspector.NetworkManager} networkManager 36 * @param {!WebInspector.NetworkManager} networkManager
36 */ 37 */
37 WebInspector.NetworkLog = function(target, networkManager) 38 WebInspector.NetworkLog = function(target, resourceTreeModel, networkManager)
dgozman 2016/07/22 17:19:43 Let's try to remove NetworkLog entirely. Or move i
eostroukhov-old 2016/07/25 19:36:11 I would like not to do this in this CL - it is alr
38 { 39 {
39 WebInspector.SDKModel.call(this, WebInspector.NetworkLog, target); 40 WebInspector.SDKModel.call(this, WebInspector.NetworkLog, target);
40 41
41 this._requests = []; 42 this._requests = [];
42 this._requestForId = {}; 43 this._requestForId = {};
43 networkManager.addEventListener(WebInspector.NetworkManager.EventTypes.Reque stStarted, this._onRequestStarted, this); 44 networkManager.addEventListener(WebInspector.NetworkManager.EventTypes.Reque stStarted, this._onRequestStarted, this);
44 target.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.Eve ntTypes.MainFrameNavigated, this._onMainFrameNavigated, this); 45 resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes .MainFrameNavigated, this._onMainFrameNavigated, this);
45 target.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.Eve ntTypes.Load, this._onLoad, this); 46 resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes .Load, this._onLoad, this);
46 target.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.Eve ntTypes.DOMContentLoaded, this._onDOMContentLoaded, this); 47 resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes .DOMContentLoaded, this._onDOMContentLoaded, this);
47 } 48 }
48 49
49 /** 50 /**
50 * @param {!WebInspector.Target} target 51 * @param {!WebInspector.Target} target
51 * @return {?WebInspector.NetworkLog} 52 * @return {?WebInspector.NetworkLog}
52 */ 53 */
53 WebInspector.NetworkLog.fromTarget = function(target) 54 WebInspector.NetworkLog.fromTarget = function(target)
54 { 55 {
55 return /** @type {?WebInspector.NetworkLog} */ (target.model(WebInspector.Ne tworkLog)); 56 return /** @type {?WebInspector.NetworkLog} */ (target.model(WebInspector.Ne tworkLog));
56 } 57 }
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 * @param {!WebInspector.NetworkRequest} mainRequest 184 * @param {!WebInspector.NetworkRequest} mainRequest
184 */ 185 */
185 WebInspector.PageLoad = function(mainRequest) 186 WebInspector.PageLoad = function(mainRequest)
186 { 187 {
187 this.id = ++WebInspector.PageLoad._lastIdentifier; 188 this.id = ++WebInspector.PageLoad._lastIdentifier;
188 this.url = mainRequest.url; 189 this.url = mainRequest.url;
189 this.startTime = mainRequest.startTime; 190 this.startTime = mainRequest.startTime;
190 } 191 }
191 192
192 WebInspector.PageLoad._lastIdentifier = 0; 193 WebInspector.PageLoad._lastIdentifier = 0;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698