| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 virtual double timerAlignmentInterval() const = 0; | 92 virtual double timerAlignmentInterval() const = 0; |
| 93 | 93 |
| 94 // Gets the DOMTimerCoordinator which maintains the "active timer | 94 // Gets the DOMTimerCoordinator which maintains the "active timer |
| 95 // list" of tasks created by setTimeout and setInterval. The | 95 // list" of tasks created by setTimeout and setInterval. The |
| 96 // DOMTimerCoordinator is owned by the ExecutionContext and should | 96 // DOMTimerCoordinator is owned by the ExecutionContext and should |
| 97 // not be used after the ExecutionContext is destroyed. | 97 // not be used after the ExecutionContext is destroyed. |
| 98 virtual DOMTimerCoordinator* timers() = 0; | 98 virtual DOMTimerCoordinator* timers() = 0; |
| 99 | 99 |
| 100 virtual void reportBlockedScriptExecutionToInspector(const String& directive
Text) = 0; | 100 virtual void reportBlockedScriptExecutionToInspector(const String& directive
Text) = 0; |
| 101 | 101 |
| 102 virtual const SecurityContext& securityContext() const = 0; | 102 virtual SecurityContext& securityContext() = 0; |
| 103 KURL contextURL() const { return virtualURL(); } | 103 KURL contextURL() const { return virtualURL(); } |
| 104 KURL contextCompleteURL(const String& url) const { return virtualCompleteURL
(url); } | 104 KURL contextCompleteURL(const String& url) const { return virtualCompleteURL
(url); } |
| 105 | 105 |
| 106 bool shouldSanitizeScriptError(const String& sourceURL, AccessControlStatus)
; | 106 bool shouldSanitizeScriptError(const String& sourceURL, AccessControlStatus)
; |
| 107 void reportException(PassRefPtrWillBeRawPtr<ErrorEvent>, int scriptId, PassR
efPtrWillBeRawPtr<ScriptCallStack>, AccessControlStatus); | 107 void reportException(PassRefPtrWillBeRawPtr<ErrorEvent>, int scriptId, PassR
efPtrWillBeRawPtr<ScriptCallStack>, AccessControlStatus); |
| 108 | 108 |
| 109 virtual void addConsoleMessage(PassRefPtrWillBeRawPtr<ConsoleMessage>) = 0; | 109 virtual void addConsoleMessage(PassRefPtrWillBeRawPtr<ConsoleMessage>) = 0; |
| 110 virtual void logExceptionToConsole(const String& errorMessage, int scriptId,
const String& sourceURL, int lineNumber, int columnNumber, PassRefPtrWillBeRawP
tr<ScriptCallStack>) = 0; | 110 virtual void logExceptionToConsole(const String& errorMessage, int scriptId,
const String& sourceURL, int lineNumber, int columnNumber, PassRefPtrWillBeRawP
tr<ScriptCallStack>) = 0; |
| 111 | 111 |
| 112 PublicURLManager& publicURLManager(); | 112 PublicURLManager& publicURLManager(); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 137 | 137 |
| 138 // Gets the next id in a circular sequence from 1 to 2^31-1. | 138 // Gets the next id in a circular sequence from 1 to 2^31-1. |
| 139 int circularSequentialID(); | 139 int circularSequentialID(); |
| 140 | 140 |
| 141 virtual EventTarget* errorEventTarget() = 0; | 141 virtual EventTarget* errorEventTarget() = 0; |
| 142 virtual EventQueue* eventQueue() const = 0; | 142 virtual EventQueue* eventQueue() const = 0; |
| 143 | 143 |
| 144 void enforceStrictMixedContentChecking() { m_strictMixedContentCheckingEnfor
ced = true; } | 144 void enforceStrictMixedContentChecking() { m_strictMixedContentCheckingEnfor
ced = true; } |
| 145 bool shouldEnforceStrictMixedContentChecking() const { return m_strictMixedC
ontentCheckingEnforced; } | 145 bool shouldEnforceStrictMixedContentChecking() const { return m_strictMixedC
ontentCheckingEnforced; } |
| 146 | 146 |
| 147 void enforceSuborigin(const String& name); |
| 148 bool hasSuborigin(); |
| 149 String suboriginName(); |
| 150 |
| 147 // Methods related to window interaction. It should be used to manage window | 151 // Methods related to window interaction. It should be used to manage window |
| 148 // focusing and window creation permission for an ExecutionContext. | 152 // focusing and window creation permission for an ExecutionContext. |
| 149 void allowWindowInteraction(); | 153 void allowWindowInteraction(); |
| 150 void consumeWindowInteraction(); | 154 void consumeWindowInteraction(); |
| 151 bool isWindowInteractionAllowed() const; | 155 bool isWindowInteractionAllowed() const; |
| 152 | 156 |
| 153 // Decides whether this context is privileged, as described in | 157 // Decides whether this context is privileged, as described in |
| 154 // https://w3c.github.io/webappsec/specs/powerfulfeatures/#settings-privileg
ed. | 158 // https://w3c.github.io/webappsec/specs/powerfulfeatures/#settings-privileg
ed. |
| 155 virtual bool isPrivilegedContext(String& errorMessage, const PrivilegeContex
tCheck = StandardPrivilegeCheck) const = 0; | 159 virtual bool isPrivilegedContext(String& errorMessage, const PrivilegeContex
tCheck = StandardPrivilegeCheck) const = 0; |
| 156 | 160 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |