1 {% from 'macros.tmpl' import license %}
4 #ifndef InternalRuntimeFlags_h
5 #define InternalRuntimeFlags_h
7 #include "bindings/core/v8/ScriptWrappable.h"
8 #include "platform/RuntimeEnabledFeatures.h"
9 #include "platform/heap/Handle.h"
10 #include "wtf/PassRefPtr.h"
11 #include "wtf/RefPtr.h"
12 #include "wtf/RefCounted.h"
16 class InternalRuntimeFlags : public GarbageCollected<InternalRuntimeFlags>, public ScriptWrappable {
17 DEFINE_WRAPPERTYPEINFO();
19 static InternalRuntimeFlags* create()
21 return new InternalRuntimeFlags;
25 Setting after startup does not work for most runtime flags, but we
26 could add an option to print setters for ones which do:
27 void set{{feature.name}}Enabled(bool isEnabled) { RuntimeEnabledFeatures::set{{feature.name}}Enabled(isEnabled); }
28 If we do that, we also need to respect Internals::resetToConsistentState.
30 {% for feature in features if not feature.custom %}
31 {% filter enable_conditional(feature.condition) %}
32 bool {{feature.first_lowered_name}}Enabled() { return RuntimeEnabledFeatures::{{feature.first_lowered_name}}Enabled(); }
36 DEFINE_INLINE_TRACE() { }
39 InternalRuntimeFlags() { }
44 #endif // InternalRuntimeFlags_h