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

Side by Side Diff: Source/devtools/front_end/sources/SourcesView.js

Issue 632573002: Adding regex support to search bar in dev tools console (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Created 6 years, 2 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @constructor 6 * @constructor
7 * @implements {WebInspector.TabbedEditorContainerDelegate} 7 * @implements {WebInspector.TabbedEditorContainerDelegate}
8 * @implements {WebInspector.Searchable} 8 * @implements {WebInspector.Searchable}
9 * @implements {WebInspector.Replaceable} 9 * @implements {WebInspector.Replaceable}
10 * @extends {WebInspector.VBox} 10 * @extends {WebInspector.VBox}
11 * @param {!WebInspector.Workspace} workspace 11 * @param {!WebInspector.Workspace} workspace
12 * @param {!WebInspector.SourcesPanel} sourcesPanel 12 * @param {!WebInspector.SourcesPanel} sourcesPanel
13 */ 13 */
14 WebInspector.SourcesView = function(workspace, sourcesPanel) 14 WebInspector.SourcesView = function(workspace, sourcesPanel)
15 { 15 {
16 WebInspector.VBox.call(this); 16 WebInspector.VBox.call(this);
17 this.registerRequiredCSS("sourcesView.css"); 17 this.registerRequiredCSS("sourcesView.css");
18 this.element.id = "sources-panel-sources-view"; 18 this.element.id = "sources-panel-sources-view";
19 this.setMinimumAndPreferredSizes(50, 25, 150, 100); 19 this.setMinimumAndPreferredSizes(50, 25, 150, 100);
20 20
21 this._workspace = workspace; 21 this._workspace = workspace;
22 this._sourcesPanel = sourcesPanel; 22 this._sourcesPanel = sourcesPanel;
23 23
24 this._searchableView = new WebInspector.SearchableView(this); 24 this._searchableView = new WebInspector.SearchableView(this, false);
25 this._searchableView.setMinimalSearchQuerySize(0); 25 this._searchableView.setMinimalSearchQuerySize(0);
26 this._searchableView.show(this.element); 26 this._searchableView.show(this.element);
27 27
28 /** @type {!Map.<!WebInspector.UISourceCode, !WebInspector.UISourceCodeFrame >} */ 28 /** @type {!Map.<!WebInspector.UISourceCode, !WebInspector.UISourceCodeFrame >} */
29 this._sourceFramesByUISourceCode = new Map(); 29 this._sourceFramesByUISourceCode = new Map();
30 30
31 var tabbedEditorPlaceholderText = WebInspector.isMac() ? WebInspector.UIStri ng("Hit Cmd+P to open a file") : WebInspector.UIString("Hit Ctrl+P to open a fil e"); 31 var tabbedEditorPlaceholderText = WebInspector.isMac() ? WebInspector.UIStri ng("Hit Cmd+P to open a file") : WebInspector.UIString("Hit Ctrl+P to open a fil e");
32 this._editorContainer = new WebInspector.TabbedEditorContainer(this, "previo uslyViewedFiles", tabbedEditorPlaceholderText); 32 this._editorContainer = new WebInspector.TabbedEditorContainer(this, "previo uslyViewedFiles", tabbedEditorPlaceholderText);
33 this._editorContainer.show(this._searchableView.element); 33 this._editorContainer.show(this._searchableView.element);
34 this._editorContainer.addEventListener(WebInspector.TabbedEditorContainer.Ev ents.EditorSelected, this._editorSelected, this); 34 this._editorContainer.addEventListener(WebInspector.TabbedEditorContainer.Ev ents.EditorSelected, this._editorSelected, this);
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after
783 var currentUISourceCode = sourcesView.currentUISourceCode(); 783 var currentUISourceCode = sourcesView.currentUISourceCode();
784 if (!currentUISourceCode) 784 if (!currentUISourceCode)
785 return true; 785 return true;
786 var nextUISourceCode = WebInspector.SourcesView.SwitchFileActionDelegate ._nextFile(currentUISourceCode); 786 var nextUISourceCode = WebInspector.SourcesView.SwitchFileActionDelegate ._nextFile(currentUISourceCode);
787 if (!nextUISourceCode) 787 if (!nextUISourceCode)
788 return true; 788 return true;
789 sourcesView.showSourceLocation(nextUISourceCode); 789 sourcesView.showSourceLocation(nextUISourceCode);
790 return true; 790 return true;
791 } 791 }
792 } 792 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698