| Index: third_party/WebKit/Source/build/scripts/templates/OriginTrials.h.tmpl
|
| diff --git a/third_party/WebKit/Source/build/scripts/templates/OriginTrials.h.tmpl b/third_party/WebKit/Source/build/scripts/templates/OriginTrials.h.tmpl
|
| index 62f1733937fc31ed8ea089e74343381bb4b9680f..a5817b6137140be8ec33d0d9d38e897188f4032c 100644
|
| --- a/third_party/WebKit/Source/build/scripts/templates/OriginTrials.h.tmpl
|
| +++ b/third_party/WebKit/Source/build/scripts/templates/OriginTrials.h.tmpl
|
| @@ -5,22 +5,44 @@
|
| #define OriginTrials_h
|
|
|
| #include "core/CoreExport.h"
|
| +#include "platform/Supplementable.h"
|
| #include "wtf/text/WTFString.h"
|
|
|
| namespace blink {
|
|
|
| class ExecutionContext;
|
| +class OriginTrialContext;
|
|
|
| -// A namespace with dynamic tests for experimental features which can be enabled through the
|
| -// experimental framework via origin trial tokens.
|
| -namespace OriginTrials {
|
| +// A class that stores dynamic tests for experimental features which can be
|
| +// enabled through the experimental framework via API keys.
|
| +
|
| +class CORE_EXPORT OriginTrials final : public GarbageCollected<OriginTrials>, public Supplement<ExecutionContext> {
|
| + USING_GARBAGE_COLLECTED_MIXIN(OriginTrials);
|
| +public:
|
| + OriginTrials(RawPtr<OriginTrialContext>);
|
| +
|
| + static const char* supplementName();
|
| + static OriginTrials* from(ExecutionContext*);
|
| +
|
| {% for feature in features %}
|
| {% if feature.origin_trial_feature_name %}
|
| - CORE_EXPORT bool {{feature.first_lowered_name}}Enabled(ExecutionContext*, String& errorMessage);
|
| - CORE_EXPORT bool {{feature.first_lowered_name}}Enabled(ExecutionContext*);
|
| +
|
| + static bool {{feature.first_lowered_name}}Enabled(ExecutionContext* executionContext, String& errorMessage);
|
| + static bool {{feature.first_lowered_name}}Enabled(ExecutionContext* executionContext);
|
| {% endif %}
|
| {% endfor %}
|
| -} // namespace OriginTrials
|
| +
|
| + DECLARE_TRACE();
|
| +
|
| +private:
|
| + {% for feature in features %}
|
| + {% if feature.origin_trial_feature_name %}
|
| + bool {{feature.first_lowered_name}}EnabledImpl(String* errorMessage);
|
| + {% endif %}
|
| + {% endfor %}
|
| +
|
| + Member<OriginTrialContext> m_originTrialContext;
|
| +};
|
|
|
| } // namespace blink
|
|
|
|
|