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

Unified Diff: third_party/WebKit/Source/build/scripts/templates/ExperimentalFeatures.h.tmpl

Issue 1538663003: Add code generation for ExperimentalFeatures class from RuntimeEnabledFeatures. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix broken GN build dependency Created 5 years 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/build/scripts/templates/ExperimentalFeatures.h.tmpl
diff --git a/third_party/WebKit/Source/build/scripts/templates/ExperimentalFeatures.h.tmpl b/third_party/WebKit/Source/build/scripts/templates/ExperimentalFeatures.h.tmpl
new file mode 100644
index 0000000000000000000000000000000000000000..d353b025985972828c087c8d59f9b5595ea39dad
--- /dev/null
+++ b/third_party/WebKit/Source/build/scripts/templates/ExperimentalFeatures.h.tmpl
@@ -0,0 +1,31 @@
+{% from 'macros.tmpl' import license %}
+{{license()}}
+
+#ifndef ExperimentalFeatures_h
+#define ExperimentalFeatures_h
+
+#include "core/CoreExport.h"
+#include "wtf/text/WTFString.h"
+
+namespace blink {
+
+class ExecutionContext;
+
+// A class that stores dynamic tests for experimental features which can be
+// enabled through the experimental framwork via API keys.
+
+class CORE_EXPORT ExperimentalFeatures {
+public:
+ {% for feature in features %}
+ {% if feature.api_name %}
+ static bool {{feature.first_lowered_name}}Enabled(ExecutionContext* executionContext, String& errorMessage);
+ {% endif %}
+ {% endfor %}
+
+private:
+ ExperimentalFeatures() { }
+};
+
+} // namespace blink
+
+#endif // ExperimentalFeatures_h

Powered by Google App Engine
This is Rietveld 408576698