Chromium Code Reviews| Index: third_party/WebKit/Source/devtools/front_end/sources/SourcesView.js |
| diff --git a/third_party/WebKit/Source/devtools/front_end/sources/SourcesView.js b/third_party/WebKit/Source/devtools/front_end/sources/SourcesView.js |
| index e96704fe77fa05c85c9575eb1441ec72d96744df..c2a19fa7e69f7207d11996598fa0f3dc25eee9a3 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/sources/SourcesView.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/sources/SourcesView.js |
| @@ -194,6 +194,10 @@ WebInspector.SourcesView.prototype = { |
| return this._currentUISourceCode; |
| }, |
| + closeAllTabs: function(){ |
|
dgozman
2016/06/20 18:32:36
style: { on next line
einbinder
2016/06/20 19:28:24
Done.
|
| + this._editorContainer.closeAllTabs(); |
| + }, |
| + |
| /** |
| * @param {!Event=} event |
| */ |
| @@ -786,3 +790,25 @@ WebInspector.SourcesView.SwitchFileActionDelegate.prototype = { |
| return true; |
| } |
| } |
| + |
| +/** |
| + * @constructor |
| + * @implements {WebInspector.ActionDelegate} |
| + */ |
| +WebInspector.SourcesView.CloseAllActionDelegate = function(){ |
| + |
| +} |
| + |
| +WebInspector.SourcesView.CloseAllActionDelegate.prototype = { |
| + /** |
| + * @override |
| + * @param {!WebInspector.Context} context |
| + * @param {string} actionId |
| + * @return {boolean} |
| + */ |
| + handleAction: function(context, actionId) |
| + { |
| + 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.
|
| + return true; |
| + } |
| +} |