| OLD | NEW |
| 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} |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 this._sourcesPanel = sourcesPanel; | 23 this._sourcesPanel = sourcesPanel; |
| 24 | 24 |
| 25 this._searchableView = new WebInspector.SearchableView(this, "sourcesViewSea
rchConfig"); | 25 this._searchableView = new WebInspector.SearchableView(this, "sourcesViewSea
rchConfig"); |
| 26 this._searchableView.setMinimalSearchQuerySize(0); | 26 this._searchableView.setMinimalSearchQuerySize(0); |
| 27 this._searchableView.show(this.element); | 27 this._searchableView.show(this.element); |
| 28 | 28 |
| 29 /** @type {!Map.<!WebInspector.UISourceCode, !WebInspector.UISourceCodeFrame
>} */ | 29 /** @type {!Map.<!WebInspector.UISourceCode, !WebInspector.UISourceCodeFrame
>} */ |
| 30 this._sourceFramesByUISourceCode = new Map(); | 30 this._sourceFramesByUISourceCode = new Map(); |
| 31 | 31 |
| 32 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 var tabbedEditorPlaceholderText = WebInspector.isMac() ? WebInspector.UIStri
ng("Hit Cmd+P to open a file") : WebInspector.UIString("Hit Ctrl+P to open a fil
e"); |
| 33 this._editorContainer = new WebInspector.TabbedEditorContainer(this, "previo
uslyViewedFiles", tabbedEditorPlaceholderText); | 33 this._editorContainer = new WebInspector.TabbedEditorContainer(this, WebInsp
ector.settings.createLocalSetting("previouslyViewedFiles", []), tabbedEditorPlac
eholderText); |
| 34 this._editorContainer.show(this._searchableView.element); | 34 this._editorContainer.show(this._searchableView.element); |
| 35 this._editorContainer.addEventListener(WebInspector.TabbedEditorContainer.Ev
ents.EditorSelected, this._editorSelected, this); | 35 this._editorContainer.addEventListener(WebInspector.TabbedEditorContainer.Ev
ents.EditorSelected, this._editorSelected, this); |
| 36 this._editorContainer.addEventListener(WebInspector.TabbedEditorContainer.Ev
ents.EditorClosed, this._editorClosed, this); | 36 this._editorContainer.addEventListener(WebInspector.TabbedEditorContainer.Ev
ents.EditorClosed, this._editorClosed, this); |
| 37 | 37 |
| 38 this._historyManager = new WebInspector.EditingLocationHistoryManager(this,
this.currentSourceFrame.bind(this)); | 38 this._historyManager = new WebInspector.EditingLocationHistoryManager(this,
this.currentSourceFrame.bind(this)); |
| 39 | 39 |
| 40 this._statusBarContainerElement = this.element.createChild("div", "sources-s
tatus-bar"); | 40 this._statusBarContainerElement = this.element.createChild("div", "sources-s
tatus-bar"); |
| 41 this._statusBarEditorActions = new WebInspector.StatusBar(this._statusBarCon
tainerElement); | 41 this._statusBarEditorActions = new WebInspector.StatusBar(this._statusBarCon
tainerElement); |
| 42 | 42 |
| 43 self.runtime.instancesPromise(WebInspector.SourcesView.EditorAction).then(ap
pendButtonsForExtensions.bind(this)); | 43 self.runtime.instancesPromise(WebInspector.SourcesView.EditorAction).then(ap
pendButtonsForExtensions.bind(this)); |
| (...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 818 var sourcesView = WebInspector.context.flavor(WebInspector.SourcesView); | 818 var sourcesView = WebInspector.context.flavor(WebInspector.SourcesView); |
| 819 var currentUISourceCode = sourcesView.currentUISourceCode(); | 819 var currentUISourceCode = sourcesView.currentUISourceCode(); |
| 820 if (!currentUISourceCode) | 820 if (!currentUISourceCode) |
| 821 return; | 821 return; |
| 822 var nextUISourceCode = WebInspector.SourcesView.SwitchFileActionDelegate
._nextFile(currentUISourceCode); | 822 var nextUISourceCode = WebInspector.SourcesView.SwitchFileActionDelegate
._nextFile(currentUISourceCode); |
| 823 if (!nextUISourceCode) | 823 if (!nextUISourceCode) |
| 824 return; | 824 return; |
| 825 sourcesView.showSourceLocation(nextUISourceCode); | 825 sourcesView.showSourceLocation(nextUISourceCode); |
| 826 } | 826 } |
| 827 } | 827 } |
| OLD | NEW |