blob: df2f2f6d0bfe665487c85e3556dbc5ebf12c4c1c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
{% from 'macros.tmpl' import license %}
{{license()}}
#ifndef InternalRuntimeFlags_h
#define InternalRuntimeFlags_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 blink {
class InternalRuntimeFlags : public GarbageCollected<InternalRuntimeFlags>, public ScriptWrappable {
DEFINE_WRAPPERTYPEINFO();
public:
static InternalRuntimeFlags* create()
{
return 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 standard_features %}
bool {{feature.first_lowered_name}}Enabled() { return RuntimeEnabledFeatures::{{feature.first_lowered_name}}Enabled(); }
{% endfor %}
DEFINE_INLINE_TRACE() { }
private:
InternalRuntimeFlags() { }
};
} // namespace blink
#endif // InternalRuntimeFlags_h
|