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

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

Issue 2376583002: DevTools: remove WI.NetworkMapping.networkURL (Closed)
Patch Set: do not blackbox fs uiSourceCodes Created 4 years, 2 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/devtools/front_end/sources/SourcesSearchScope.js ('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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @constructor 6 * @constructor
7 * @implements {WebInspector.TabbedEditorContainerDelegate} 7 * @implements {WebInspector.TabbedEditorContainerDelegate}
8 * @implements {WebInspector.Searchable} 8 * @implements {WebInspector.Searchable}
9 * @implements {WebInspector.Replaceable} 9 * @implements {WebInspector.Replaceable}
10 * @extends {WebInspector.VBox} 10 * @extends {WebInspector.VBox}
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 }, 260 },
261 261
262 /** 262 /**
263 * @param {!WebInspector.UISourceCode} uiSourceCode 263 * @param {!WebInspector.UISourceCode} uiSourceCode
264 */ 264 */
265 _addUISourceCode: function(uiSourceCode) 265 _addUISourceCode: function(uiSourceCode)
266 { 266 {
267 if (uiSourceCode.isFromServiceProject()) 267 if (uiSourceCode.isFromServiceProject())
268 return; 268 return;
269 this._editorContainer.addUISourceCode(uiSourceCode); 269 this._editorContainer.addUISourceCode(uiSourceCode);
270 // Replace debugger script-based uiSourceCode with a network-based one.
271 var currentUISourceCode = this._editorContainer.currentFile();
272 if (!currentUISourceCode)
273 return;
274 var networkURL = WebInspector.networkMapping.networkURL(uiSourceCode);
275 var currentNetworkURL = WebInspector.networkMapping.networkURL(currentUI SourceCode);
276 if (currentUISourceCode.isFromServiceProject() && currentUISourceCode != = uiSourceCode && currentNetworkURL === networkURL && networkURL) {
277 this._editorContainer.showFile(uiSourceCode);
278 this._editorContainer.removeUISourceCode(currentUISourceCode);
279 }
280 }, 270 },
281 271
282 _uiSourceCodeRemoved: function(event) 272 _uiSourceCodeRemoved: function(event)
283 { 273 {
284 var uiSourceCode = /** @type {!WebInspector.UISourceCode} */ (event.data ); 274 var uiSourceCode = /** @type {!WebInspector.UISourceCode} */ (event.data );
285 this._removeUISourceCodes([uiSourceCode]); 275 this._removeUISourceCodes([uiSourceCode]);
286 }, 276 },
287 277
288 /** 278 /**
289 * @param {!Array.<!WebInspector.UISourceCode>} uiSourceCodes 279 * @param {!Array.<!WebInspector.UISourceCode>} uiSourceCodes
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 */ 803 */
814 handleAction: function(context, actionId) 804 handleAction: function(context, actionId)
815 { 805 {
816 var sourcesView = WebInspector.context.flavor(WebInspector.SourcesView); 806 var sourcesView = WebInspector.context.flavor(WebInspector.SourcesView);
817 if (!sourcesView) 807 if (!sourcesView)
818 return false; 808 return false;
819 sourcesView._editorContainer.closeAllFiles(); 809 sourcesView._editorContainer.closeAllFiles();
820 return true; 810 return true;
821 } 811 }
822 } 812 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/sources/SourcesSearchScope.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698