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

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

Issue 2536273003: [DevTools] Remove Workspace.projectTypes enum part1. (Closed)
Patch Set: Created 4 years, 1 month 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/ScriptFormatterEditorAction.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js b/third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js
index 3e9b88f9bc2f26202a1e45d3d4154bffdb26c689..be85a5e8962f665823cdabfee36f89cc54ca1e90 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js
@@ -208,11 +208,10 @@ Sources.ScriptFormatterEditorAction = class {
return false;
if (Persistence.persistence.binding(uiSourceCode))
return false;
- var supportedProjectTypes =
- [Workspace.projectTypes.Network, Workspace.projectTypes.Debugger, Workspace.projectTypes.ContentScripts];
- if (supportedProjectTypes.indexOf(uiSourceCode.project().type()) === -1)
- return false;
- return uiSourceCode.contentType().hasScripts();
+ if (Bindings.NetworkProject.isNetworkUISourceCode(uiSourceCode) ||
+ Bindings.DefaultScriptMapping.isDebuggerUISourceCode(uiSourceCode))
+ return uiSourceCode.contentType().hasScripts();
+ return false;
}
_toggleFormatScriptSource() {

Powered by Google App Engine
This is Rietveld 408576698