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

Unified Diff: third_party/WebKit/Source/core/dom/ExecutionContext.h

Issue 1743623002: [Experimental Framework] Make the OriginTrialContext a member of ExecutionContext (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use WeakPersistent for Oilpan Created 4 years, 10 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/core/dom/ExecutionContext.h
diff --git a/third_party/WebKit/Source/core/dom/ExecutionContext.h b/third_party/WebKit/Source/core/dom/ExecutionContext.h
index acafd94fd9d5c1930c25f1a6fbb565d7345edc58..431e3b92659f57f0c98bfe4e43cee98396e09431 100644
--- a/third_party/WebKit/Source/core/dom/ExecutionContext.h
+++ b/third_party/WebKit/Source/core/dom/ExecutionContext.h
@@ -53,6 +53,8 @@ class EventQueue;
class EventTarget;
class ExecutionContextTask;
class LocalDOMWindow;
+class OriginTrials;
+class OriginTrialContext;
class PublicURLManager;
class SecurityOrigin;
class ScriptCallStack;
@@ -82,6 +84,7 @@ public:
virtual bool isContextThread() const { return true; }
+ OriginTrials* originTrials();
SecurityOrigin* securityOrigin();
ContentSecurityPolicy* contentSecurityPolicy();
const KURL& url() const;
@@ -170,6 +173,9 @@ private:
bool dispatchErrorEvent(PassRefPtrWillBeRawPtr<ErrorEvent>, AccessControlStatus);
void runSuspendableTasks();
+ // Override to enable experimental features through origin trials
+ virtual OriginTrialContext* originTrialContext() { return nullptr; }
+
#if !ENABLE(OILPAN)
virtual void refExecutionContext() = 0;
virtual void derefExecutionContext() = 0;
@@ -197,6 +203,9 @@ private:
bool m_isRunSuspendableTasksScheduled;
ReferrerPolicy m_referrerPolicy;
+
+ // Experimental framework policy and cache
+ OwnPtr<OriginTrials> m_originTrials;
jbroman 2016/03/01 23:29:21 One thought here: consider using a supplement (Wil
iclelland 2016/03/03 21:47:01 That's a really good idea. Thanks, done.
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698