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 RefCountedWillBeGarbageCollected<InternalRuntimeFlags>, public ScriptWrappable {
18 static PassRefPtrWillBeRawPtr<InternalRuntimeFlags> create()
20 return adoptRefWillBeNoop(new InternalRuntimeFlags);
24 Setting after startup does not work for most runtime flags, but we
25 could add an option to print setters for ones which do:
26 void set{{feature.name}}Enabled(bool isEnabled) { RuntimeEnabledFeatures::set{{feature.name}}Enabled(isEnabled); }
27 If we do that, we also need to respect Internals::resetToConsistentState.
29 {% for feature in features if not feature.custom %}
30 {% filter enable_conditional(feature.condition) %}
31 bool {{feature.first_lowered_name}}Enabled() { return RuntimeEnabledFeatures::{{feature.first_lowered_name}}Enabled(); }
35 void trace(Visitor*) { }
38 InternalRuntimeFlags()
40 ScriptWrappable::init(this);
46 #endif // InternalRuntimeFlags_h