1 {% from 'macros.tmpl' import license %}
4 #ifndef InternalRuntimeFlags_h
5 #define InternalRuntimeFlags_h
7 #include "RuntimeEnabledFeatures.h"
8 #include "platform/heap/Handle.h"
9 #include "wtf/PassRefPtr.h"
10 #include "wtf/RefPtr.h"
11 #include "wtf/RefCounted.h"
15 class InternalRuntimeFlags : public RefCountedWillBeGarbageCollected<InternalRuntimeFlags> {
17 static PassRefPtrWillBeRawPtr<InternalRuntimeFlags> create()
19 return adoptRefWillBeNoop(new InternalRuntimeFlags);
23 Setting after startup does not work for most runtime flags, but we
24 could add an option to print setters for ones which do:
25 void set{{feature.name}}Enabled(bool isEnabled) { RuntimeEnabledFeatures::set{{feature.name}}Enabled(isEnabled); }
26 If we do that, we also need to respect Internals::resetToConsistentState.
28 {% for feature in features if not feature.custom %}
29 {% filter enable_conditional(feature.condition) %}
30 bool {{feature.first_lowered_name}}Enabled() { return RuntimeEnabledFeatures::{{feature.first_lowered_name}}Enabled(); }
34 void trace(Visitor*) { }
37 InternalRuntimeFlags() { }
40 } // namespace WebCore
42 #endif // InternalRuntimeFlags_h