Chromium Code Reviews| 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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 187 }, | 187 }, |
| 188 | 188 |
| 189 /** | 189 /** |
| 190 * @return {?WebInspector.UISourceCode} | 190 * @return {?WebInspector.UISourceCode} |
| 191 */ | 191 */ |
| 192 currentUISourceCode: function() | 192 currentUISourceCode: function() |
| 193 { | 193 { |
| 194 return this._currentUISourceCode; | 194 return this._currentUISourceCode; |
| 195 }, | 195 }, |
| 196 | 196 |
| 197 closeAllTabs: function(){ | |
|
dgozman
2016/06/20 18:32:36
style: { on next line
einbinder
2016/06/20 19:28:24
Done.
| |
| 198 this._editorContainer.closeAllTabs(); | |
| 199 }, | |
| 200 | |
| 197 /** | 201 /** |
| 198 * @param {!Event=} event | 202 * @param {!Event=} event |
| 199 */ | 203 */ |
| 200 _onCloseEditorTab: function(event) | 204 _onCloseEditorTab: function(event) |
| 201 { | 205 { |
| 202 var uiSourceCode = this.currentUISourceCode(); | 206 var uiSourceCode = this.currentUISourceCode(); |
| 203 if (!uiSourceCode) | 207 if (!uiSourceCode) |
| 204 return false; | 208 return false; |
| 205 this._editorContainer.closeFile(uiSourceCode); | 209 this._editorContainer.closeFile(uiSourceCode); |
| 206 return true; | 210 return true; |
| (...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 779 var currentUISourceCode = sourcesView.currentUISourceCode(); | 783 var currentUISourceCode = sourcesView.currentUISourceCode(); |
| 780 if (!currentUISourceCode) | 784 if (!currentUISourceCode) |
| 781 return false; | 785 return false; |
| 782 var nextUISourceCode = WebInspector.SourcesView.SwitchFileActionDelegate ._nextFile(currentUISourceCode); | 786 var nextUISourceCode = WebInspector.SourcesView.SwitchFileActionDelegate ._nextFile(currentUISourceCode); |
| 783 if (!nextUISourceCode) | 787 if (!nextUISourceCode) |
| 784 return false; | 788 return false; |
| 785 sourcesView.showSourceLocation(nextUISourceCode); | 789 sourcesView.showSourceLocation(nextUISourceCode); |
| 786 return true; | 790 return true; |
| 787 } | 791 } |
| 788 } | 792 } |
| 793 | |
| 794 /** | |
| 795 * @constructor | |
| 796 * @implements {WebInspector.ActionDelegate} | |
| 797 */ | |
| 798 WebInspector.SourcesView.CloseAllActionDelegate = function(){ | |
| 799 | |
| 800 } | |
| 801 | |
| 802 WebInspector.SourcesView.CloseAllActionDelegate.prototype = { | |
| 803 /** | |
| 804 * @override | |
| 805 * @param {!WebInspector.Context} context | |
| 806 * @param {string} actionId | |
| 807 * @return {boolean} | |
| 808 */ | |
| 809 handleAction: function(context, actionId) | |
| 810 { | |
| 811 WebInspector.context.flavor(WebInspector.SourcesView).closeAllTabs(); | |
|
dgozman
2016/06/20 18:32:36
There could be no current SourcesView.
einbinder
2016/06/20 19:28:24
Done.
| |
| 812 return true; | |
| 813 } | |
| 814 } | |
| OLD | NEW |