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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sources/NavigatorView.js

Issue 2122353002: [DevTools] Make resource tree model optional (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments Created 4 years, 3 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 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 10 *
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 { 186 {
187 return !uiSourceCode.isFromServiceProject(); 187 return !uiSourceCode.isFromServiceProject();
188 }, 188 },
189 189
190 /** 190 /**
191 * @param {!WebInspector.UISourceCode} uiSourceCode 191 * @param {!WebInspector.UISourceCode} uiSourceCode
192 * @return {?WebInspector.ResourceTreeFrame} 192 * @return {?WebInspector.ResourceTreeFrame}
193 */ 193 */
194 _uiSourceCodeFrame: function(uiSourceCode) 194 _uiSourceCodeFrame: function(uiSourceCode)
195 { 195 {
196 var target = WebInspector.NetworkProject.targetForProject(uiSourceCode.p roject()); 196 var frame = WebInspector.NetworkProject.frameForProject(uiSourceCode.pro ject());
197 if (!target) 197 if (!frame) {
198 return null; 198 var target = WebInspector.NetworkProject.targetForProject(uiSourceCo de.project());
199 return WebInspector.NetworkProject.frameForProject(uiSourceCode.project( )) || target.resourceTreeModel.mainFrame; 199 var resourceTreeModel = target && WebInspector.ResourceTreeModel.fro mTarget(target);
200 frame = resourceTreeModel && resourceTreeModel.mainFrame;
201 }
202 return frame;
200 }, 203 },
201 204
202 /** 205 /**
203 * @param {!WebInspector.UISourceCode} uiSourceCode 206 * @param {!WebInspector.UISourceCode} uiSourceCode
204 */ 207 */
205 _addUISourceCode: function(uiSourceCode) 208 _addUISourceCode: function(uiSourceCode)
206 { 209 {
207 if (!this.accept(uiSourceCode)) 210 if (!this.accept(uiSourceCode))
208 return; 211 return;
209 212
(...skipping 1356 matching lines...) Expand 10 before | Expand all | Expand 10 after
1566 { 1569 {
1567 if (this._treeElement) 1570 if (this._treeElement)
1568 return this._treeElement; 1571 return this._treeElement;
1569 this._treeElement = new WebInspector.NavigatorFolderTreeElement(this._na vigatorView, this._type, this._title, this._hoverCallback); 1572 this._treeElement = new WebInspector.NavigatorFolderTreeElement(this._na vigatorView, this._type, this._title, this._hoverCallback);
1570 this._treeElement.setNode(this); 1573 this._treeElement.setNode(this);
1571 return this._treeElement; 1574 return this._treeElement;
1572 }, 1575 },
1573 1576
1574 __proto__: WebInspector.NavigatorTreeNode.prototype 1577 __proto__: WebInspector.NavigatorTreeNode.prototype
1575 } 1578 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698