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

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

Issue 369853002: DevTools: Rename TargetAwareObject into SDKObject (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 6 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 | Annotate | Revision Log
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 12 matching lines...) Expand all
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
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.TargetAware} 33 * @extends {WebInspector.SDKObject}
34 * @param {!WebInspector.Target} target 34 * @param {!WebInspector.Target} target
35 */ 35 */
36 WebInspector.NetworkLog = function(target) 36 WebInspector.NetworkLog = function(target)
37 { 37 {
38 WebInspector.TargetAware.call(this, target); 38 WebInspector.SDKObject.call(this, target);
39 39
40 this._requests = []; 40 this._requests = [];
41 this._requestForId = {}; 41 this._requestForId = {};
42 target.networkManager.addEventListener(WebInspector.NetworkManager.EventType s.RequestStarted, this._onRequestStarted, this); 42 target.networkManager.addEventListener(WebInspector.NetworkManager.EventType s.RequestStarted, this._onRequestStarted, this);
43 target.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.Eve ntTypes.MainFrameNavigated, this._onMainFrameNavigated, this); 43 target.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.Eve ntTypes.MainFrameNavigated, this._onMainFrameNavigated, this);
44 target.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.Eve ntTypes.Load, this._onLoad, this); 44 target.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.Eve ntTypes.Load, this._onLoad, this);
45 target.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.Eve ntTypes.DOMContentLoaded, this._onDOMContentLoaded, this); 45 target.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.Eve ntTypes.DOMContentLoaded, this._onDOMContentLoaded, this);
46 } 46 }
47 47
48 WebInspector.NetworkLog.prototype = { 48 WebInspector.NetworkLog.prototype = {
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 129
130 /** 130 /**
131 * @param {!NetworkAgent.RequestId} requestId 131 * @param {!NetworkAgent.RequestId} requestId
132 * @return {?WebInspector.NetworkRequest} 132 * @return {?WebInspector.NetworkRequest}
133 */ 133 */
134 requestForId: function(requestId) 134 requestForId: function(requestId)
135 { 135 {
136 return this._requestForId[requestId]; 136 return this._requestForId[requestId];
137 }, 137 },
138 138
139 __proto__: WebInspector.TargetAware.prototype 139 __proto__: WebInspector.SDKObject.prototype
140 } 140 }
141 141
142 /** 142 /**
143 * @type {!WebInspector.NetworkLog} 143 * @type {!WebInspector.NetworkLog}
144 */ 144 */
145 WebInspector.networkLog; 145 WebInspector.networkLog;
146 146
147 /** 147 /**
148 * @constructor 148 * @constructor
149 * @param {!WebInspector.NetworkRequest} mainRequest 149 * @param {!WebInspector.NetworkRequest} mainRequest
150 */ 150 */
151 WebInspector.PageLoad = function(mainRequest) 151 WebInspector.PageLoad = function(mainRequest)
152 { 152 {
153 this.id = ++WebInspector.PageLoad._lastIdentifier; 153 this.id = ++WebInspector.PageLoad._lastIdentifier;
154 this.url = mainRequest.url; 154 this.url = mainRequest.url;
155 this.startTime = mainRequest.startTime; 155 this.startTime = mainRequest.startTime;
156 } 156 }
157 157
158 WebInspector.PageLoad._lastIdentifier = 0; 158 WebInspector.PageLoad._lastIdentifier = 0;
OLDNEW
« no previous file with comments | « Source/devtools/front_end/sdk/LiveEditSupport.js ('k') | Source/devtools/front_end/sdk/NetworkManager.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698