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

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

Issue 2736853002: DevTools: Convert FilteredListWidget to use an optional provider (Closed)
Patch Set: missing timeout Created 3 years, 9 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
OLDNEW
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.FilteredUISourceCodeListProvi der {
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 */ 14 */
15 constructor(sourcesView, defaultScores) { 15 constructor(sourcesView, defaultScores) {
16 super(defaultScores); 16 super(defaultScores);
17 this._sourcesView = sourcesView; 17 this._sourcesView = sourcesView;
18 this.populate();
19 } 18 }
20 19
21 /** 20 /**
22 * @param {!Sources.SourcesView} sourcesView 21 * @param {!Sources.SourcesView} sourcesView
23 * @param {string} query 22 * @param {string} query
24 * @param {!Map.<!Workspace.UISourceCode, number>} defaultScores 23 * @param {!Map.<!Workspace.UISourceCode, number>} defaultScores
25 * @param {!Array<string>} history 24 * @param {!Array<string>} history
26 */ 25 */
27 static show(sourcesView, query, defaultScores, history) { 26 static show(sourcesView, query, defaultScores, history) {
28 var dialog = new Sources.OpenResourceDialog(sourcesView, defaultScores); 27 var dialog = new Sources.OpenResourceDialog(sourcesView, defaultScores);
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 */ 72 */
74 renderAsTwoRows() { 73 renderAsTwoRows() {
75 return true; 74 return true;
76 } 75 }
77 }; 76 };
78 77
79 78
80 /** 79 /**
81 * @unrestricted 80 * @unrestricted
82 */ 81 */
83 Sources.SelectUISourceCodeForProjectTypesDialog = class extends Sources.Filtered UISourceCodeListDelegate { 82 Sources.SelectUISourceCodeForProjectTypesDialog = class extends Sources.Filtered UISourceCodeListProvider {
84 /** 83 /**
85 * @param {!Array.<string>} types 84 * @param {!Array.<string>} types
86 * @param {function(?Workspace.UISourceCode)} callback 85 * @param {function(?Workspace.UISourceCode)} callback
87 */ 86 */
88 constructor(types, callback) { 87 constructor(types, callback) {
89 super(); 88 super();
90 this._types = types; 89 this._types = types;
91 this._callback = callback; 90 this._callback = callback;
92 this.populate();
93 } 91 }
94 92
95 /** 93 /**
96 * @param {string} name 94 * @param {string} name
97 * @param {!Array.<string>} types 95 * @param {!Array.<string>} types
98 * @param {function(?Workspace.UISourceCode)} callback 96 * @param {function(?Workspace.UISourceCode)} callback
99 */ 97 */
100 static show(name, types, callback) { 98 static show(name, types, callback) {
101 var filteredItemSelectionDialog = 99 var filteredItemSelectionDialog =
102 new QuickOpen.FilteredListWidget(new Sources.SelectUISourceCodeForProjec tTypesDialog(types, callback)); 100 new QuickOpen.FilteredListWidget(new Sources.SelectUISourceCodeForProjec tTypesDialog(types, callback));
(...skipping 21 matching lines...) Expand all
124 } 122 }
125 123
126 /** 124 /**
127 * @override 125 * @override
128 * @return {boolean} 126 * @return {boolean}
129 */ 127 */
130 renderAsTwoRows() { 128 renderAsTwoRows() {
131 return true; 129 return true;
132 } 130 }
133 }; 131 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698