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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sources/SourcesNavigator.js

Issue 2570503003: [DevTools] Prepare navigator to multiple nodes per UISourceCode. (Closed)
Patch Set: Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/sources/NavigatorView.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/sources/SourcesNavigator.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/SourcesNavigator.js b/third_party/WebKit/Source/devtools/front_end/sources/SourcesNavigator.js
index 0b8dbf6c6a79e5fe9438b149e9bf967f0ed58b65..df79b1834619ead5b8febcbf9ef249b2de0e6a50 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/SourcesNavigator.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/SourcesNavigator.js
@@ -57,9 +57,8 @@ Sources.SourcesNavigatorView = class extends Sources.NavigatorView {
var inspectedURL = mainTarget && mainTarget.inspectedURL();
if (!inspectedURL)
return;
- for (var node of this.uiSourceCodeNodes()) {
- var uiSourceCode = node.uiSourceCode();
- if (uiSourceCode.url() === inspectedURL)
+ for (var uiSourceCode of this.workspace().uiSourceCodes()) {
+ if (this.accept(uiSourceCode) && uiSourceCode.url() === inspectedURL)
this.revealUISourceCode(uiSourceCode, true);
}
}
@@ -116,9 +115,8 @@ Sources.NetworkNavigatorView = class extends Sources.NavigatorView {
var inspectedURL = mainTarget && mainTarget.inspectedURL();
if (!inspectedURL)
return;
- for (var node of this.uiSourceCodeNodes()) {
- var uiSourceCode = node.uiSourceCode();
- if (uiSourceCode.url() === inspectedURL)
+ for (var uiSourceCode of this.workspace().uiSourceCodes()) {
+ if (this.accept(uiSourceCode) && uiSourceCode.url() === inspectedURL)
this.revealUISourceCode(uiSourceCode, true);
}
}
@@ -224,12 +222,13 @@ Sources.SnippetsNavigatorView = class extends Sources.NavigatorView {
/**
* @override
* @param {!Event} event
- * @param {!Workspace.UISourceCode} uiSourceCode
+ * @param {!Sources.NavigatorUISourceCodeTreeNode} node
*/
- handleFileContextMenu(event, uiSourceCode) {
+ handleFileContextMenu(event, node) {
+ var uiSourceCode = node.uiSourceCode();
var contextMenu = new UI.ContextMenu(event);
contextMenu.appendItem(Common.UIString('Run'), this._handleEvaluateSnippet.bind(this, uiSourceCode));
- contextMenu.appendItem(Common.UIString('Rename'), this.rename.bind(this, uiSourceCode));
+ contextMenu.appendItem(Common.UIString('Rename'), this.rename.bind(this, node));
contextMenu.appendItem(Common.UIString('Remove'), this._handleRemoveSnippet.bind(this, uiSourceCode));
contextMenu.appendSeparator();
contextMenu.appendItem(Common.UIString('New'), this._handleCreateSnippet.bind(this));
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/sources/NavigatorView.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698