| 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 | 61 class CORE_EXPORT ExecutionContext |
| 61 : public ContextLifecycleNotifier, public WillBeHeapSupplementable<Execution
Context> { | 62 : public ContextLifecycleNotifier, public WillBeHeapSupplementable<Execution
Context> { |
| 62 WTF_MAKE_NONCOPYABLE(ExecutionContext); | 63 WTF_MAKE_NONCOPYABLE(ExecutionContext); |
| 63 public: | 64 public: |
| 64 DECLARE_VIRTUAL_TRACE(); | 65 DECLARE_VIRTUAL_TRACE(); |
| 65 | 66 |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 bool isWindowInteractionAllowed() const; | 149 bool isWindowInteractionAllowed() const; |
| 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 void setReferrerPolicy(ReferrerPolicy); | 156 virtual void setReferrerPolicy(ReferrerPolicy); |
| 156 ReferrerPolicy getReferrerPolicy() const { return m_referrerPolicy; } | 157 ReferrerPolicy getReferrerPolicy() const { return m_referrerPolicy; } |
| 157 | 158 |
| 159 // Override to enable experimental features through origin trials |
| 160 virtual PassOwnPtrWillBeRawPtr<OriginTrialContext> createOriginTrialContext(
); |
| 161 |
| 158 protected: | 162 protected: |
| 159 ExecutionContext(); | 163 ExecutionContext(); |
| 160 virtual ~ExecutionContext(); | 164 virtual ~ExecutionContext(); |
| 161 | 165 |
| 162 virtual const KURL& virtualURL() const = 0; | 166 virtual const KURL& virtualURL() const = 0; |
| 163 virtual KURL virtualCompleteURL(const String&) const = 0; | 167 virtual KURL virtualCompleteURL(const String&) const = 0; |
| 164 | 168 |
| 165 private: | 169 private: |
| 166 bool dispatchErrorEvent(PassRefPtrWillBeRawPtr<ErrorEvent>, AccessControlSta
tus); | 170 bool dispatchErrorEvent(PassRefPtrWillBeRawPtr<ErrorEvent>, AccessControlSta
tus); |
| 167 void runSuspendableTasks(); | 171 void runSuspendableTasks(); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 191 | 195 |
| 192 Deque<OwnPtr<SuspendableTask>> m_suspendedTasks; | 196 Deque<OwnPtr<SuspendableTask>> m_suspendedTasks; |
| 193 bool m_isRunSuspendableTasksScheduled; | 197 bool m_isRunSuspendableTasksScheduled; |
| 194 | 198 |
| 195 ReferrerPolicy m_referrerPolicy; | 199 ReferrerPolicy m_referrerPolicy; |
| 196 }; | 200 }; |
| 197 | 201 |
| 198 } // namespace blink | 202 } // namespace blink |
| 199 | 203 |
| 200 #endif // ExecutionContext_h | 204 #endif // ExecutionContext_h |
| OLD | NEW |