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

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

Issue 2625873003: DevTools: Move history handling into FilteredListWidget from the delegate (Closed)
Patch Set: Fix test 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
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.JavaScriptOutlineDialog = class extends QuickOpen.FilteredListWidget.Del egate { 10 Sources.JavaScriptOutlineDialog = class extends QuickOpen.FilteredListWidget.Del egate {
11 /** 11 /**
12 * @param {!Workspace.UISourceCode} uiSourceCode 12 * @param {!Workspace.UISourceCode} uiSourceCode
13 * @param {function(number, number)} selectItemCallback 13 * @param {function(number, number)} selectItemCallback
14 */ 14 */
15 constructor(uiSourceCode, selectItemCallback) { 15 constructor(uiSourceCode, selectItemCallback) {
16 super([]); 16 super();
17 17
18 this._functionItems = []; 18 this._functionItems = [];
19 this._selectItemCallback = selectItemCallback; 19 this._selectItemCallback = selectItemCallback;
20 Common.formatterWorkerPool.javaScriptOutline(uiSourceCode.workingCopy(), thi s._didBuildOutlineChunk.bind(this)); 20 Common.formatterWorkerPool.javaScriptOutline(uiSourceCode.workingCopy(), thi s._didBuildOutlineChunk.bind(this));
21 } 21 }
22 22
23 /** 23 /**
24 * @param {!Workspace.UISourceCode} uiSourceCode 24 * @param {!Workspace.UISourceCode} uiSourceCode
25 * @param {function(number, number)} selectItemCallback 25 * @param {function(number, number)} selectItemCallback
26 */ 26 */
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 * @param {string} promptValue 91 * @param {string} promptValue
92 */ 92 */
93 selectItem(itemIndex, promptValue) { 93 selectItem(itemIndex, promptValue) {
94 if (itemIndex === null) 94 if (itemIndex === null)
95 return; 95 return;
96 var lineNumber = this._functionItems[itemIndex].line; 96 var lineNumber = this._functionItems[itemIndex].line;
97 if (!isNaN(lineNumber) && lineNumber >= 0) 97 if (!isNaN(lineNumber) && lineNumber >= 0)
98 this._selectItemCallback(lineNumber, this._functionItems[itemIndex].column ); 98 this._selectItemCallback(lineNumber, this._functionItems[itemIndex].column );
99 } 99 }
100 }; 100 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698