| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 * Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
| 4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
| 5 */ | 5 */ |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * @unrestricted | 8 * @unrestricted |
| 9 */ | 9 */ |
| 10 Sources.OpenResourceDialog = class extends Sources.FilteredUISourceCodeListDeleg
ate { | 10 Sources.OpenResourceDialog = class extends Sources.FilteredUISourceCodeListDeleg
ate { |
| 11 /** | 11 /** |
| 12 * @param {!Sources.SourcesView} sourcesView | 12 * @param {!Sources.SourcesView} sourcesView |
| 13 * @param {!Map.<!Workspace.UISourceCode, number>} defaultScores | 13 * @param {!Map.<!Workspace.UISourceCode, number>} defaultScores |
| 14 * @param {!Array<string>} history | |
| 15 */ | 14 */ |
| 16 constructor(sourcesView, defaultScores, history) { | 15 constructor(sourcesView, defaultScores) { |
| 17 super(defaultScores, history); | 16 super(defaultScores); |
| 18 this._sourcesView = sourcesView; | 17 this._sourcesView = sourcesView; |
| 19 this.populate(); | 18 this.populate(); |
| 20 } | 19 } |
| 21 | 20 |
| 22 /** | 21 /** |
| 23 * @param {!Sources.SourcesView} sourcesView | 22 * @param {!Sources.SourcesView} sourcesView |
| 24 * @param {string} query | 23 * @param {string} query |
| 25 * @param {!Map.<!Workspace.UISourceCode, number>} defaultScores | 24 * @param {!Map.<!Workspace.UISourceCode, number>} defaultScores |
| 26 * @param {!Array<string>} history | 25 * @param {!Array<string>} history |
| 27 */ | 26 */ |
| 28 static show(sourcesView, query, defaultScores, history) { | 27 static show(sourcesView, query, defaultScores, history) { |
| 29 var dialog = new Sources.OpenResourceDialog(sourcesView, defaultScores, hist
ory); | 28 var dialog = new Sources.OpenResourceDialog(sourcesView, defaultScores); |
| 30 if (InspectorFrontendHost.isUnderTest()) | 29 if (InspectorFrontendHost.isUnderTest()) |
| 31 Sources.OpenResourceDialog._instanceForTest = dialog; | 30 Sources.OpenResourceDialog._instanceForTest = dialog; |
| 32 var filteredItemSelectionDialog = new QuickOpen.FilteredListWidget(dialog); | 31 var filteredItemSelectionDialog = new QuickOpen.FilteredListWidget(dialog, h
istory); |
| 33 filteredItemSelectionDialog.showAsDialog(); | 32 filteredItemSelectionDialog.showAsDialog(); |
| 34 filteredItemSelectionDialog.setQuery(query); | 33 filteredItemSelectionDialog.setQuery(query); |
| 35 } | 34 } |
| 36 | 35 |
| 37 /** | 36 /** |
| 38 * @override | 37 * @override |
| 39 * @param {?Workspace.UISourceCode} uiSourceCode | 38 * @param {?Workspace.UISourceCode} uiSourceCode |
| 40 * @param {number=} lineNumber | 39 * @param {number=} lineNumber |
| 41 * @param {number=} columnNumber | 40 * @param {number=} columnNumber |
| 42 */ | 41 */ |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 } | 122 } |
| 124 | 123 |
| 125 /** | 124 /** |
| 126 * @override | 125 * @override |
| 127 * @return {boolean} | 126 * @return {boolean} |
| 128 */ | 127 */ |
| 129 renderAsTwoRows() { | 128 renderAsTwoRows() { |
| 130 return true; | 129 return true; |
| 131 } | 130 } |
| 132 }; | 131 }; |
| OLD | NEW |