| OLD | NEW |
| 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 Loading... |
| 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; |
| 56 class PublicURLManager; | 57 class PublicURLManager; |
| 57 class SecurityOrigin; | 58 class SecurityOrigin; |
| 58 class ScriptCallStack; | 59 class ScriptCallStack; |
| 59 | 60 |
| 60 class CORE_EXPORT ExecutionContext : public ContextLifecycleNotifier, public Sup
plementable<ExecutionContext> { | 61 class CORE_EXPORT ExecutionContext : public ContextLifecycleNotifier, public Sup
plementable<ExecutionContext> { |
| 61 WTF_MAKE_NONCOPYABLE(ExecutionContext); | 62 WTF_MAKE_NONCOPYABLE(ExecutionContext); |
| 62 public: | 63 public: |
| 63 DECLARE_VIRTUAL_TRACE(); | 64 DECLARE_VIRTUAL_TRACE(); |
| 64 | 65 |
| 65 // Used to specify whether |isSecureContext| should walk the | 66 // Used to specify whether |isSecureContext| should walk the |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 | 150 |
| 150 // Decides whether this context is privileged, as described in | 151 // Decides whether this context is privileged, as described in |
| 151 // https://w3c.github.io/webappsec/specs/powerfulfeatures/#settings-privileg
ed. | 152 // https://w3c.github.io/webappsec/specs/powerfulfeatures/#settings-privileg
ed. |
| 152 virtual bool isSecureContext(String& errorMessage, const SecureContextCheck
= StandardSecureContextCheck) const = 0; | 153 virtual bool isSecureContext(String& errorMessage, const SecureContextCheck
= StandardSecureContextCheck) const = 0; |
| 153 virtual bool isSecureContext(const SecureContextCheck = StandardSecureContex
tCheck) const; | 154 virtual bool isSecureContext(const SecureContextCheck = StandardSecureContex
tCheck) const; |
| 154 | 155 |
| 155 virtual String outgoingReferrer() const; | 156 virtual String outgoingReferrer() const; |
| 156 void setReferrerPolicy(ReferrerPolicy); | 157 void setReferrerPolicy(ReferrerPolicy); |
| 157 ReferrerPolicy getReferrerPolicy() const { return m_referrerPolicy; } | 158 ReferrerPolicy getReferrerPolicy() const { return m_referrerPolicy; } |
| 158 | 159 |
| 160 // Override to enable experimental features through origin trials |
| 161 virtual RawPtr<OriginTrialContext> createOriginTrialContext(); |
| 162 |
| 159 protected: | 163 protected: |
| 160 ExecutionContext(); | 164 ExecutionContext(); |
| 161 virtual ~ExecutionContext(); | 165 virtual ~ExecutionContext(); |
| 162 | 166 |
| 163 virtual const KURL& virtualURL() const = 0; | 167 virtual const KURL& virtualURL() const = 0; |
| 164 virtual KURL virtualCompleteURL(const String&) const = 0; | 168 virtual KURL virtualCompleteURL(const String&) const = 0; |
| 165 | 169 |
| 166 private: | 170 private: |
| 167 bool dispatchErrorEvent(RawPtr<ErrorEvent>, AccessControlStatus); | 171 bool dispatchErrorEvent(RawPtr<ErrorEvent>, AccessControlStatus); |
| 168 void runSuspendableTasks(); | 172 void runSuspendableTasks(); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 192 | 196 |
| 193 Deque<OwnPtr<SuspendableTask>> m_suspendedTasks; | 197 Deque<OwnPtr<SuspendableTask>> m_suspendedTasks; |
| 194 bool m_isRunSuspendableTasksScheduled; | 198 bool m_isRunSuspendableTasksScheduled; |
| 195 | 199 |
| 196 ReferrerPolicy m_referrerPolicy; | 200 ReferrerPolicy m_referrerPolicy; |
| 197 }; | 201 }; |
| 198 | 202 |
| 199 } // namespace blink | 203 } // namespace blink |
| 200 | 204 |
| 201 #endif // ExecutionContext_h | 205 #endif // ExecutionContext_h |
| OLD | NEW |