blob: 6707e73f46df19952c7be63ad6f86cbc26972ec4 (
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
43
44
45
46
47
48
49
|
{% from "macros.tmpl" import wrap_with_condition, license -%}
{{ license() }}
#ifndef RuntimeEnabledFeatures_h
#define RuntimeEnabledFeatures_h
#include "platform/PlatformExport.h"
namespace WebCore {
// A class that stores static enablers for all experimental features.
class PLATFORM_EXPORT RuntimeEnabledFeatures {
public:
{%- for feature_set in feature_sets %}
static void set{{feature_set|capitalize}}FeaturesEnabled(bool);
{%- endfor %}
{% for feature in features %}
{%- if feature.custom %}
static bool {{feature.first_lowered_name}}Enabled();
{%- else %}
{%- if feature.condition %}
#if ENABLE({{feature.condition}})
{%- endif %}
static void set{{feature.name}}Enabled(bool isEnabled) { is{{feature.name}}Enabled = isEnabled; }
static bool {{feature.first_lowered_name}}Enabled() { return {{feature.enabled_condition}}; }
{%- if feature.condition %}
#else
static void set{{feature.name}}Enabled(bool) { }
static bool {{feature.first_lowered_name}}Enabled() { return false; }
#endif
{%- endif %}
{%- endif %}
{% endfor %}
private:
RuntimeEnabledFeatures() { }
{% for feature in features if not feature.custom %}
{%- call wrap_with_condition(feature.condition) %}
static bool is{{feature.name}}Enabled;
{%- endcall %}
{%- endfor %}
};
} // namespace WebCore
#endif // RuntimeEnabledFeatures_h
|