OLD | NEW |
1 {% from 'macros.tmpl' import license %} | 1 {% from 'macros.tmpl' import license %} |
2 {{license()}} | 2 {{license()}} |
3 | 3 |
4 #ifndef OriginTrials_h | 4 #ifndef OriginTrials_h |
5 #define OriginTrials_h | 5 #define OriginTrials_h |
6 | 6 |
7 #include "core/CoreExport.h" | 7 #include "core/CoreExport.h" |
8 #include "platform/Supplementable.h" | 8 #include "platform/Supplementable.h" |
9 #include "wtf/text/WTFString.h" | 9 #include "wtf/text/WTFString.h" |
10 | 10 |
11 namespace blink { | 11 namespace blink { |
12 | 12 |
13 class ExecutionContext; | 13 class ExecutionContext; |
14 class OriginTrialContext; | 14 class OriginTrialContext; |
15 | 15 |
16 // A class that stores dynamic tests for experimental features which can be | 16 // A class that stores dynamic tests for experimental features which can be |
17 // enabled through the experimental framework via API keys. | 17 // enabled through the experimental framework via API keys. |
18 | 18 |
19 class CORE_EXPORT OriginTrials final : public GarbageCollected<OriginTrials>, pu
blic HeapSupplement<ExecutionContext> { | 19 class CORE_EXPORT OriginTrials final : public GarbageCollected<OriginTrials>, pu
blic Supplement<ExecutionContext> { |
20 USING_GARBAGE_COLLECTED_MIXIN(OriginTrials) | 20 USING_GARBAGE_COLLECTED_MIXIN(OriginTrials); |
21 public: | 21 public: |
22 OriginTrials(RawPtr<OriginTrialContext>); | 22 OriginTrials(RawPtr<OriginTrialContext>); |
23 | 23 |
24 static const char* supplementName(); | 24 static const char* supplementName(); |
25 static OriginTrials* from(ExecutionContext*); | 25 static OriginTrials* from(ExecutionContext*); |
26 | 26 |
27 {% for feature in features %} | 27 {% for feature in features %} |
28 {% if feature.origin_trial_feature_name %} | 28 {% if feature.origin_trial_feature_name %} |
29 | 29 |
30 static bool {{feature.first_lowered_name}}Enabled(ExecutionContext* executio
nContext, String& errorMessage); | 30 static bool {{feature.first_lowered_name}}Enabled(ExecutionContext* executio
nContext, String& errorMessage); |
31 static bool {{feature.first_lowered_name}}Enabled(ExecutionContext* executio
nContext); | 31 static bool {{feature.first_lowered_name}}Enabled(ExecutionContext* executio
nContext); |
32 {% endif %} | 32 {% endif %} |
33 {% endfor %} | 33 {% endfor %} |
34 | 34 |
35 DECLARE_TRACE(); | 35 DECLARE_TRACE(); |
36 | 36 |
37 private: | 37 private: |
38 {% for feature in features %} | 38 {% for feature in features %} |
39 {% if feature.origin_trial_feature_name %} | 39 {% if feature.origin_trial_feature_name %} |
40 bool {{feature.first_lowered_name}}EnabledImpl(String* errorMessage); | 40 bool {{feature.first_lowered_name}}EnabledImpl(String* errorMessage); |
41 {% endif %} | 41 {% endif %} |
42 {% endfor %} | 42 {% endfor %} |
43 | 43 |
44 Member<OriginTrialContext> m_originTrialContext; | 44 Member<OriginTrialContext> m_originTrialContext; |
45 }; | 45 }; |
46 | 46 |
47 } // namespace blink | 47 } // namespace blink |
48 | 48 |
49 #endif // OriginTrials_h | 49 #endif // OriginTrials_h |
OLD | NEW |