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

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

Issue 2799603004: DevTools: Preserve source selection when using Quick Open (Closed)
Patch Set: Created 3 years, 8 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 | no next file » | 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 Sources.OpenFileQuickOpen = class extends Sources.FilteredUISourceCodeListProvid er { 7 Sources.OpenFileQuickOpen = class extends Sources.FilteredUISourceCodeListProvid er {
8 /** 8 /**
9 * @override 9 * @override
10 */ 10 */
11 attach() { 11 attach() {
12 this.setDefaultScores(Sources.SourcesView.defaultUISourceCodeScores()); 12 this.setDefaultScores(Sources.SourcesView.defaultUISourceCodeScores());
13 super.attach(); 13 super.attach();
14 } 14 }
15 15
16 /** 16 /**
17 * @override 17 * @override
18 * @param {?Workspace.UISourceCode} uiSourceCode 18 * @param {?Workspace.UISourceCode} uiSourceCode
19 * @param {number=} lineNumber 19 * @param {number=} lineNumber
20 * @param {number=} columnNumber 20 * @param {number=} columnNumber
21 */ 21 */
22 uiSourceCodeSelected(uiSourceCode, lineNumber, columnNumber) { 22 uiSourceCodeSelected(uiSourceCode, lineNumber, columnNumber) {
23 Host.userMetrics.actionTaken(Host.UserMetrics.Action.SelectFileFromFilePicke r); 23 Host.userMetrics.actionTaken(Host.UserMetrics.Action.SelectFileFromFilePicke r);
24 24
25 if (!uiSourceCode) 25 if (!uiSourceCode)
26 return; 26 return;
27 Common.Revealer.reveal(uiSourceCode.uiLocation((lineNumber || 0), columnNumb er)); 27 if (typeof lineNumber === 'number')
28 Common.Revealer.reveal(uiSourceCode.uiLocation(lineNumber, columnNumber));
29 else
30 Common.Revealer.reveal(uiSourceCode);
28 } 31 }
29 32
30 /** 33 /**
31 * @override 34 * @override
32 * @param {!Workspace.Project} project 35 * @param {!Workspace.Project} project
33 * @return {boolean} 36 * @return {boolean}
34 */ 37 */
35 filterProject(project) { 38 filterProject(project) {
36 return !project.isServiceProject(); 39 return !project.isServiceProject();
37 } 40 }
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 } 91 }
89 92
90 /** 93 /**
91 * @override 94 * @override
92 * @return {boolean} 95 * @return {boolean}
93 */ 96 */
94 renderAsTwoRows() { 97 renderAsTwoRows() {
95 return true; 98 return true;
96 } 99 }
97 }; 100 };
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698