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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sources/SourcesView.js

Issue 2080893002: Close all sources command (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
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;
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698