Index: third_party/WebKit/Source/devtools/front_end/sources/OpenFileQuickOpen.js |
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/OpenResourceDialog.js b/third_party/WebKit/Source/devtools/front_end/sources/OpenFileQuickOpen.js |
similarity index 61% |
rename from third_party/WebKit/Source/devtools/front_end/sources/OpenResourceDialog.js |
rename to third_party/WebKit/Source/devtools/front_end/sources/OpenFileQuickOpen.js |
index 72be08cda8f1ee091f528e930025a7be419c0a0f..a3fad397596e66ba151a8b328464fa3032b999ac 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/sources/OpenResourceDialog.js |
+++ b/third_party/WebKit/Source/devtools/front_end/sources/OpenFileQuickOpen.js |
@@ -7,33 +7,13 @@ |
/** |
* @unrestricted |
*/ |
-Sources.OpenResourceDialog = class extends Sources.FilteredUISourceCodeListDelegate { |
- /** |
- * @param {!Sources.SourcesView} sourcesView |
- * @param {!Map.<!Workspace.UISourceCode, number>} defaultScores |
- */ |
- constructor(sourcesView, defaultScores) { |
- super(defaultScores); |
- this._sourcesView = sourcesView; |
+Sources.OpenFileQuickOpen = class extends Sources.FilteredUISourceCodeListDelegate { |
+ constructor() { |
+ super(Sources.SourcesView.defaultUISourceCodeScores()); |
this.populate(); |
} |
/** |
- * @param {!Sources.SourcesView} sourcesView |
- * @param {string} query |
- * @param {!Map.<!Workspace.UISourceCode, number>} defaultScores |
- * @param {!Array<string>} history |
- */ |
- static show(sourcesView, query, defaultScores, history) { |
- var dialog = new Sources.OpenResourceDialog(sourcesView, defaultScores); |
- if (InspectorFrontendHost.isUnderTest()) |
- Sources.OpenResourceDialog._instanceForTest = dialog; |
- var filteredItemSelectionDialog = new QuickOpen.FilteredListWidget(dialog, history); |
- filteredItemSelectionDialog.showAsDialog(); |
- filteredItemSelectionDialog.setQuery(query); |
- } |
- |
- /** |
* @override |
* @param {?Workspace.UISourceCode} uiSourceCode |
* @param {number=} lineNumber |
@@ -41,19 +21,8 @@ Sources.OpenResourceDialog = class extends Sources.FilteredUISourceCodeListDeleg |
*/ |
uiSourceCodeSelected(uiSourceCode, lineNumber, columnNumber) { |
if (!uiSourceCode) |
- uiSourceCode = this._sourcesView.currentUISourceCode(); |
- if (!uiSourceCode) |
return; |
- this._sourcesView.showSourceLocation(uiSourceCode, lineNumber, columnNumber); |
- } |
- |
- /** |
- * @override |
- * @param {string} query |
- * @return {boolean} |
- */ |
- shouldShowMatchingItems(query) { |
- return !query.startsWith(':'); |
+ Common.Revealer.reveal(uiSourceCode.uiLocation((lineNumber || 0), columnNumber)); |
} |
/** |