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

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

Issue 2254683003: DevTools: setting to auto-reveal in navigator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addrcomm Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/sources/module.json » ('j') | 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/SourcesPanel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js b/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js
index 5348993f0784b4615bccb078b009b0bf6cb0aa1f..2edf7c56d8b9ef4c2749e2d4b514d5b337374619 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js
@@ -355,8 +355,9 @@ WebInspector.SourcesPanel.prototype = {
/**
* @param {!WebInspector.UISourceCode} uiSourceCode
+ * @param {boolean=} skipShow
*/
- _revealInNavigator: function(uiSourceCode)
+ _revealInNavigator: function(uiSourceCode, skipShow)
{
var extensions = self.runtime.extensions(WebInspector.NavigatorView);
Promise.all(extensions.map(extension => extension.instance())).then(filterNavigators);
@@ -370,7 +371,8 @@ WebInspector.SourcesPanel.prototype = {
var navigatorView = /** @type {!WebInspector.NavigatorView} */ (objects[i]);
if (navigatorView.accept(uiSourceCode)) {
navigatorView.revealUISourceCode(uiSourceCode, true);
- WebInspector.viewManager.showView(extensions[i].descriptor()["viewId"]);
+ if (skipShow)
lushnikov 2016/08/25 02:00:09 should it be vice-versa?
luoe 2016/08/25 18:19:34 This check is wrong. Really, we want to call show
+ WebInspector.viewManager.showView(extensions[i].descriptor()["viewId"]);
}
}
}
@@ -527,6 +529,8 @@ WebInspector.SourcesPanel.prototype = {
{
var uiSourceCode = /** @type {!WebInspector.UISourceCode} */ (event.data);
this._editorChanged(uiSourceCode);
+ if (this.editorView.mainWidget() && WebInspector.moduleSetting("autoRevealInNavigator").get())
+ this._revealInNavigator(uiSourceCode, true);
},
/**
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/sources/module.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698