| OLD | NEW |
| (Empty) |
| 1 {% from "macros.tmpl" import wrap_with_condition, license -%} | |
| 2 {{ license() }} | |
| 3 | |
| 4 #ifndef InternalRuntimeFlags_h | |
| 5 #define InternalRuntimeFlags_h | |
| 6 | |
| 7 #include "RuntimeEnabledFeatures.h" | |
| 8 #include "wtf/PassRefPtr.h" | |
| 9 #include "wtf/RefPtr.h" | |
| 10 #include "wtf/RefCounted.h" | |
| 11 | |
| 12 namespace WebCore { | |
| 13 | |
| 14 class InternalRuntimeFlags : public RefCounted<InternalRuntimeFlags> { | |
| 15 public: | |
| 16 static PassRefPtr<InternalRuntimeFlags> create() | |
| 17 { | |
| 18 return adoptRef(new InternalRuntimeFlags); | |
| 19 } | |
| 20 | |
| 21 {#- | |
| 22 Setting after startup does not work for most runtime flags, but we | |
| 23 could add an option to print setters for ones which do: | |
| 24 void set{{feature.name}}Enabled(bool isEnabled) { RuntimeEnabledFeatures::se
t{{feature.name}}Enabled(isEnabled); } | |
| 25 If we do that, we also need to respect Internals::resetToConsistentState. | |
| 26 #} | |
| 27 {% for feature in features if not feature.custom %} | |
| 28 {%- call wrap_with_condition(feature.condition) %} | |
| 29 bool {{feature.first_lowered_name}}Enabled() { return RuntimeEnabledFeatures
::{{feature.first_lowered_name}}Enabled(); } | |
| 30 {%- endcall %} | |
| 31 {% endfor %} | |
| 32 | |
| 33 private: | |
| 34 InternalRuntimeFlags() { } | |
| 35 }; | |
| 36 | |
| 37 } // namespace WebCore | |
| 38 | |
| 39 #endif // InternalRuntimeFlags_h | |
| 40 | |
| OLD | NEW |