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 closeAllFiles: function() | |
| 198 { | |
| 199 this._editorContainer.closeAllFiles(); | |
| 200 }, | |
| 201 | |
| 197 /** | 202 /** |
| 198 * @param {!Event=} event | 203 * @param {!Event=} event |
| 199 */ | 204 */ |
| 200 _onCloseEditorTab: function(event) | 205 _onCloseEditorTab: function(event) |
| 201 { | 206 { |
| 202 var uiSourceCode = this.currentUISourceCode(); | 207 var uiSourceCode = this.currentUISourceCode(); |
| 203 if (!uiSourceCode) | 208 if (!uiSourceCode) |
| 204 return false; | 209 return false; |
| 205 this._editorContainer.closeFile(uiSourceCode); | 210 this._editorContainer.closeFile(uiSourceCode); |
| 206 return true; | 211 return true; |
| (...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 779 var currentUISourceCode = sourcesView.currentUISourceCode(); | 784 var currentUISourceCode = sourcesView.currentUISourceCode(); |
| 780 if (!currentUISourceCode) | 785 if (!currentUISourceCode) |
| 781 return false; | 786 return false; |
| 782 var nextUISourceCode = WebInspector.SourcesView.SwitchFileActionDelegate ._nextFile(currentUISourceCode); | 787 var nextUISourceCode = WebInspector.SourcesView.SwitchFileActionDelegate ._nextFile(currentUISourceCode); |
| 783 if (!nextUISourceCode) | 788 if (!nextUISourceCode) |
| 784 return false; | 789 return false; |
| 785 sourcesView.showSourceLocation(nextUISourceCode); | 790 sourcesView.showSourceLocation(nextUISourceCode); |
| 786 return true; | 791 return true; |
| 787 } | 792 } |
| 788 } | 793 } |
| 794 | |
| 795 /** | |
| 796 * @constructor | |
| 797 * @implements {WebInspector.ActionDelegate} | |
| 798 */ | |
| 799 WebInspector.SourcesView.CloseAllActionDelegate = function(){ | |
|
dgozman
2016/06/20 21:00:23
style: { on the next line
einbinder
2016/06/20 21:16:43
Done.
| |
| 800 | |
|
dgozman
2016/06/20 21:00:23
style: extra blank line
einbinder
2016/06/20 21:16:42
Done.
| |
| 801 } | |
| 802 | |
| 803 WebInspector.SourcesView.CloseAllActionDelegate.prototype = { | |
| 804 /** | |
| 805 * @override | |
| 806 * @param {!WebInspector.Context} context | |
| 807 * @param {string} actionId | |
| 808 * @return {boolean} | |
| 809 */ | |
| 810 handleAction: function(context, actionId) | |
| 811 { | |
| 812 var sourcesView = WebInspector.context.flavor(WebInspector.SourcesView) | |
|
dgozman
2016/06/20 21:00:23
style: missing semicolon
einbinder
2016/06/20 21:16:43
Done.
| |
| 813 if (!sourcesView) | |
| 814 return false; | |
| 815 sourcesView.closeAllFiles(); | |
|
dgozman
2016/06/20 21:00:23
This class is a part of SourcesView implementation
einbinder
2016/06/20 21:16:43
Done.
| |
| 816 return true; | |
| 817 } | |
| 818 } | |
| OLD | NEW |