Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Unified Diff: third_party/WebKit/Source/build/scripts/templates/OriginTrials.h.tmpl

Issue 1743623002: [Experimental Framework] Make the OriginTrialContext a member of ExecutionContext (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 f49790ed580e176c09d93000e3e703397add34a9..d7f4d54b0c2f3b339e70f8d36cc54ee3beaf7f08 100644
--- a/third_party/WebKit/Source/build/scripts/templates/OriginTrials.h.tmpl
+++ b/third_party/WebKit/Source/build/scripts/templates/OriginTrials.h.tmpl
@@ -5,32 +5,43 @@
#define OriginTrials_h
#include "core/CoreExport.h"
+#include "platform/Supplementable.h"
#include "wtf/text/WTFString.h"
namespace blink {
class ExecutionContext;
+class OriginTrialContext;
// A class that stores dynamic tests for experimental features which can be
// enabled through the experimental framework via API keys.
-class CORE_EXPORT OriginTrials {
+class CORE_EXPORT OriginTrials final : public NoBaseWillBeGarbageCollected<OriginTrials>, public WillBeHeapSupplement<ExecutionContext> {
+WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(OriginTrials)
public:
+ OriginTrials(PassOwnPtrWillBeRawPtr<OriginTrialContext>);
+
+ static const char* supplementName();
+ static OriginTrials* from(ExecutionContext*);
+
{% for feature in features %}
{% if feature.origin_trial_feature_name %}
+
static bool {{feature.first_lowered_name}}Enabled(ExecutionContext* executionContext, String& errorMessage);
static bool {{feature.first_lowered_name}}Enabled(ExecutionContext* executionContext);
{% endif %}
{% endfor %}
-private:
- OriginTrials() { }
+ DECLARE_TRACE();
+private:
{% for feature in features %}
{% if feature.origin_trial_feature_name %}
- static bool {{feature.first_lowered_name}}EnabledImpl(ExecutionContext* executionContext, String* errorMessage);
+ bool {{feature.first_lowered_name}}EnabledImpl(String* errorMessage);
{% endif %}
{% endfor %}
+
+ OwnPtrWillBeMember<OriginTrialContext> m_originTrialContext;
};
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/build/scripts/templates/OriginTrials.cpp.tmpl ('k') | third_party/WebKit/Source/core/core.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698