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

Side by Side Diff: third_party/WebKit/Source/core/dom/ExecutionContext.h

Issue 1833063002: Store the list of trial tokens in OriginTrialContext (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 namespace blink { 46 namespace blink {
47 47
48 class ActiveDOMObject; 48 class ActiveDOMObject;
49 class ConsoleMessage; 49 class ConsoleMessage;
50 class DOMTimerCoordinator; 50 class DOMTimerCoordinator;
51 class ErrorEvent; 51 class ErrorEvent;
52 class EventQueue; 52 class EventQueue;
53 class EventTarget; 53 class EventTarget;
54 class ExecutionContextTask; 54 class ExecutionContextTask;
55 class LocalDOMWindow; 55 class LocalDOMWindow;
56 class OriginTrialContext;
57 class PublicURLManager; 56 class PublicURLManager;
58 class SecurityOrigin; 57 class SecurityOrigin;
59 class ScriptCallStack; 58 class ScriptCallStack;
60 59
61 class CORE_EXPORT ExecutionContext 60 class CORE_EXPORT ExecutionContext
62 : public ContextLifecycleNotifier, public WillBeHeapSupplementable<Execution Context> { 61 : public ContextLifecycleNotifier, public WillBeHeapSupplementable<Execution Context> {
63 WTF_MAKE_NONCOPYABLE(ExecutionContext); 62 WTF_MAKE_NONCOPYABLE(ExecutionContext);
64 public: 63 public:
65 DECLARE_VIRTUAL_TRACE(); 64 DECLARE_VIRTUAL_TRACE();
66 65
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 bool isWindowInteractionAllowed() const; 149 bool isWindowInteractionAllowed() const;
151 150
152 // Decides whether this context is privileged, as described in 151 // Decides whether this context is privileged, as described in
153 // https://w3c.github.io/webappsec/specs/powerfulfeatures/#settings-privileg ed. 152 // https://w3c.github.io/webappsec/specs/powerfulfeatures/#settings-privileg ed.
154 virtual bool isSecureContext(String& errorMessage, const SecureContextCheck = StandardSecureContextCheck) const = 0; 153 virtual bool isSecureContext(String& errorMessage, const SecureContextCheck = StandardSecureContextCheck) const = 0;
155 virtual bool isSecureContext(const SecureContextCheck = StandardSecureContex tCheck) const; 154 virtual bool isSecureContext(const SecureContextCheck = StandardSecureContex tCheck) const;
156 155
157 virtual void setReferrerPolicy(ReferrerPolicy); 156 virtual void setReferrerPolicy(ReferrerPolicy);
158 ReferrerPolicy getReferrerPolicy() const { return m_referrerPolicy; } 157 ReferrerPolicy getReferrerPolicy() const { return m_referrerPolicy; }
159 158
160 // Override to enable experimental features through origin trials
161 virtual PassOwnPtrWillBeRawPtr<OriginTrialContext> createOriginTrialContext( );
162
163 protected: 159 protected:
164 ExecutionContext(); 160 ExecutionContext();
165 virtual ~ExecutionContext(); 161 virtual ~ExecutionContext();
166 162
167 virtual const KURL& virtualURL() const = 0; 163 virtual const KURL& virtualURL() const = 0;
168 virtual KURL virtualCompleteURL(const String&) const = 0; 164 virtual KURL virtualCompleteURL(const String&) const = 0;
169 165
170 private: 166 private:
171 bool dispatchErrorEvent(PassRefPtrWillBeRawPtr<ErrorEvent>, AccessControlSta tus); 167 bool dispatchErrorEvent(PassRefPtrWillBeRawPtr<ErrorEvent>, AccessControlSta tus);
172 void runSuspendableTasks(); 168 void runSuspendableTasks();
(...skipping 23 matching lines...) Expand all
196 192
197 Deque<OwnPtr<SuspendableTask>> m_suspendedTasks; 193 Deque<OwnPtr<SuspendableTask>> m_suspendedTasks;
198 bool m_isRunSuspendableTasksScheduled; 194 bool m_isRunSuspendableTasksScheduled;
199 195
200 ReferrerPolicy m_referrerPolicy; 196 ReferrerPolicy m_referrerPolicy;
201 }; 197 };
202 198
203 } // namespace blink 199 } // namespace blink
204 200
205 #endif // ExecutionContext_h 201 #endif // ExecutionContext_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698