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

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

Issue 2615753003: DevTools: do not subscribe to global object events from the widgets that are not necessarily dispos… (Closed)
Patch Set: same Created 3 years, 11 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/ui/TextPrompt.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.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 14 * @param {!Array<string>} history
15 */ 15 */
16 constructor(sourcesView, defaultScores, history) { 16 constructor(sourcesView, defaultScores, history) {
17 super(defaultScores, history); 17 super(defaultScores, history);
18 this._sourcesView = sourcesView; 18 this._sourcesView = sourcesView;
19 this.populate(); 19 this.populate();
20 } 20 }
21 21
22 /** 22 /**
23 * @param {!Sources.SourcesView} sourcesView 23 * @param {!Sources.SourcesView} sourcesView
24 * @param {string} query 24 * @param {string} query
25 * @param {!Map.<!Workspace.UISourceCode, number>} defaultScores 25 * @param {!Map.<!Workspace.UISourceCode, number>} defaultScores
26 * @param {!Array<string>} history 26 * @param {!Array<string>} history
27 */ 27 */
28 static show(sourcesView, query, defaultScores, history) { 28 static show(sourcesView, query, defaultScores, history) {
29 var dialog = new Sources.OpenResourceDialog(sourcesView, defaultScores, hist ory); 29 var dialog = new Sources.OpenResourceDialog(sourcesView, defaultScores, hist ory);
30 Sources.OpenResourceDialog._instanceForTest = dialog; 30 if (InspectorFrontendHost.isUnderTest())
31 Sources.OpenResourceDialog._instanceForTest = dialog;
31 var filteredItemSelectionDialog = new UI.FilteredListWidget(dialog); 32 var filteredItemSelectionDialog = new UI.FilteredListWidget(dialog);
32 filteredItemSelectionDialog.showAsDialog(); 33 filteredItemSelectionDialog.showAsDialog();
33 filteredItemSelectionDialog.setQuery(query); 34 filteredItemSelectionDialog.setQuery(query);
34 } 35 }
35 36
36 /** 37 /**
37 * @override 38 * @override
38 * @param {?Workspace.UISourceCode} uiSourceCode 39 * @param {?Workspace.UISourceCode} uiSourceCode
39 * @param {number=} lineNumber 40 * @param {number=} lineNumber
40 * @param {number=} columnNumber 41 * @param {number=} columnNumber
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 } 123 }
123 124
124 /** 125 /**
125 * @override 126 * @override
126 * @return {boolean} 127 * @return {boolean}
127 */ 128 */
128 renderAsTwoRows() { 129 renderAsTwoRows() {
129 return true; 130 return true;
130 } 131 }
131 }; 132 };
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/ui/TextPrompt.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698