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

Side by Side 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: Clean up unused headers 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * Copyright (C) 2012 Google Inc. All Rights Reserved. 3 * Copyright (C) 2012 Google Inc. All Rights Reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 16 matching lines...) Expand all
27 27
28 #ifndef ExecutionContext_h 28 #ifndef ExecutionContext_h
29 #define ExecutionContext_h 29 #define ExecutionContext_h
30 30
31 #include "core/CoreExport.h" 31 #include "core/CoreExport.h"
32 #include "core/dom/ContextLifecycleNotifier.h" 32 #include "core/dom/ContextLifecycleNotifier.h"
33 #include "core/dom/ContextLifecycleObserver.h" 33 #include "core/dom/ContextLifecycleObserver.h"
34 #include "core/dom/SecurityContext.h" 34 #include "core/dom/SecurityContext.h"
35 #include "core/dom/SuspendableTask.h" 35 #include "core/dom/SuspendableTask.h"
36 #include "core/fetch/AccessControlStatus.h" 36 #include "core/fetch/AccessControlStatus.h"
37 #include "core/origin_trials/OriginTrialContext.h"
jbroman 2016/03/04 15:23:48 nit: ExecutionContext.h is a header included in lo
iclelland 2016/03/07 15:38:37 Thanks, done.
37 #include "platform/Supplementable.h" 38 #include "platform/Supplementable.h"
38 #include "platform/heap/Handle.h" 39 #include "platform/heap/Handle.h"
39 #include "platform/weborigin/KURL.h" 40 #include "platform/weborigin/KURL.h"
40 #include "platform/weborigin/ReferrerPolicy.h" 41 #include "platform/weborigin/ReferrerPolicy.h"
41 #include "wtf/Deque.h" 42 #include "wtf/Deque.h"
42 #include "wtf/Noncopyable.h" 43 #include "wtf/Noncopyable.h"
43 #include "wtf/OwnPtr.h" 44 #include "wtf/OwnPtr.h"
44 #include "wtf/PassOwnPtr.h" 45 #include "wtf/PassOwnPtr.h"
45 46
46 namespace blink { 47 namespace blink {
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 bool isWindowInteractionAllowed() const; 153 bool isWindowInteractionAllowed() const;
153 154
154 // Decides whether this context is privileged, as described in 155 // Decides whether this context is privileged, as described in
155 // https://w3c.github.io/webappsec/specs/powerfulfeatures/#settings-privileg ed. 156 // https://w3c.github.io/webappsec/specs/powerfulfeatures/#settings-privileg ed.
156 virtual bool isSecureContext(String& errorMessage, const SecureContextCheck = StandardSecureContextCheck) const = 0; 157 virtual bool isSecureContext(String& errorMessage, const SecureContextCheck = StandardSecureContextCheck) const = 0;
157 virtual bool isSecureContext(const SecureContextCheck = StandardSecureContex tCheck) const; 158 virtual bool isSecureContext(const SecureContextCheck = StandardSecureContex tCheck) const;
158 159
159 virtual void setReferrerPolicy(ReferrerPolicy); 160 virtual void setReferrerPolicy(ReferrerPolicy);
160 ReferrerPolicy getReferrerPolicy() const { return m_referrerPolicy; } 161 ReferrerPolicy getReferrerPolicy() const { return m_referrerPolicy; }
161 162
163 // Override to enable experimental features through origin trials
164 virtual PassOwnPtrWillBeRawPtr<OriginTrialContext> createOriginTrialContext( ) { return nullptr; }
165
162 protected: 166 protected:
163 ExecutionContext(); 167 ExecutionContext();
164 virtual ~ExecutionContext(); 168 virtual ~ExecutionContext();
165 169
166 virtual const KURL& virtualURL() const = 0; 170 virtual const KURL& virtualURL() const = 0;
167 virtual KURL virtualCompleteURL(const String&) const = 0; 171 virtual KURL virtualCompleteURL(const String&) const = 0;
168 172
169 private: 173 private:
170 bool dispatchErrorEvent(PassRefPtrWillBeRawPtr<ErrorEvent>, AccessControlSta tus); 174 bool dispatchErrorEvent(PassRefPtrWillBeRawPtr<ErrorEvent>, AccessControlSta tus);
171 void runSuspendableTasks(); 175 void runSuspendableTasks();
(...skipping 23 matching lines...) Expand all
195 199
196 Deque<OwnPtr<SuspendableTask>> m_suspendedTasks; 200 Deque<OwnPtr<SuspendableTask>> m_suspendedTasks;
197 bool m_isRunSuspendableTasksScheduled; 201 bool m_isRunSuspendableTasksScheduled;
198 202
199 ReferrerPolicy m_referrerPolicy; 203 ReferrerPolicy m_referrerPolicy;
200 }; 204 };
201 205
202 } // namespace blink 206 } // namespace blink
203 207
204 #endif // ExecutionContext_h 208 #endif // ExecutionContext_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698