-{% from "macros.tmpl" import wrap_with_condition, license -%}
-{{ license() }}
+{% from 'macros.tmpl' import license %}
+{{license()}}
#ifndef InternalRuntimeFlags_h
#define InternalRuntimeFlags_h
-#include "RuntimeEnabledFeatures.h"
-#include "heap/Handle.h"
+#include "bindings/core/v8/ScriptWrappable.h"
+#include "platform/RuntimeEnabledFeatures.h"
+#include "platform/heap/Handle.h"
#include "wtf/PassRefPtr.h"
#include "wtf/RefPtr.h"
#include "wtf/RefCounted.h"
-namespace WebCore {
+namespace blink {
-class InternalRuntimeFlags : public RefCountedWillBeGarbageCollected<InternalRuntimeFlags> {
+class InternalRuntimeFlags : public RefCountedWillBeGarbageCollected<InternalRuntimeFlags>, public ScriptWrappable {
public:
static PassRefPtrWillBeRawPtr<InternalRuntimeFlags> create()
{
return adoptRefWillBeNoop(new InternalRuntimeFlags);
}
-{#-
+{#
Setting after startup does not work for most runtime flags, but we
could add an option to print setters for ones which do:
void set{{feature.name}}Enabled(bool isEnabled) { RuntimeEnabledFeatures::set{{feature.name}}Enabled(isEnabled); }
If we do that, we also need to respect Internals::resetToConsistentState.
#}
-{% for feature in features if not feature.custom %}
-{%- call wrap_with_condition(feature.condition) %}
+ {% for feature in features if not feature.custom %}
+ {% filter enable_conditional(feature.condition) %}
bool {{feature.first_lowered_name}}Enabled() { return RuntimeEnabledFeatures::{{feature.first_lowered_name}}Enabled(); }
-{%- endcall %}
-{% endfor %}
+ {% endfilter %}
+ {% endfor %}
void trace(Visitor*) { }
private:
- InternalRuntimeFlags() { }
+ InternalRuntimeFlags()
+ {
+ ScriptWrappable::init(this);
+ }
};
-} // namespace WebCore
+} // namespace blink
#endif // InternalRuntimeFlags_h