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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 virtual LocalDOMWindow* executingWindow() { return 0; } | 90 virtual LocalDOMWindow* executingWindow() { return 0; } |
91 virtual String userAgent() const = 0; | 91 virtual String userAgent() const = 0; |
92 virtual void postTask(const WebTraceLocation&, std::unique_ptr<ExecutionCont
extTask>, const String& taskNameForInstrumentation = emptyString()) = 0; // Exec
utes the task on context's thread asynchronously. | 92 virtual void postTask(const WebTraceLocation&, std::unique_ptr<ExecutionCont
extTask>, const String& taskNameForInstrumentation = emptyString()) = 0; // Exec
utes the task on context's thread asynchronously. |
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; | |
101 | |
102 virtual SecurityContext& securityContext() = 0; | 100 virtual SecurityContext& securityContext() = 0; |
103 KURL contextURL() const { return virtualURL(); } | 101 KURL contextURL() const { return virtualURL(); } |
104 KURL contextCompleteURL(const String& url) const { return virtualCompleteURL
(url); } | 102 KURL contextCompleteURL(const String& url) const { return virtualCompleteURL
(url); } |
105 | 103 |
106 bool shouldSanitizeScriptError(const String& sourceURL, AccessControlStatus)
; | 104 bool shouldSanitizeScriptError(const String& sourceURL, AccessControlStatus)
; |
107 void reportException(ErrorEvent*, AccessControlStatus); | 105 void reportException(ErrorEvent*, AccessControlStatus); |
108 | 106 |
109 virtual void addConsoleMessage(ConsoleMessage*) = 0; | 107 virtual void addConsoleMessage(ConsoleMessage*) = 0; |
110 virtual void exceptionThrown(const String& errorMessage, std::unique_ptr<Sou
rceLocation>) = 0; | 108 virtual void exceptionThrown(const String& errorMessage, std::unique_ptr<Sou
rceLocation>) = 0; |
111 | 109 |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 | 185 |
188 Deque<std::unique_ptr<SuspendableTask>> m_suspendedTasks; | 186 Deque<std::unique_ptr<SuspendableTask>> m_suspendedTasks; |
189 bool m_isRunSuspendableTasksScheduled; | 187 bool m_isRunSuspendableTasksScheduled; |
190 | 188 |
191 ReferrerPolicy m_referrerPolicy; | 189 ReferrerPolicy m_referrerPolicy; |
192 }; | 190 }; |
193 | 191 |
194 } // namespace blink | 192 } // namespace blink |
195 | 193 |
196 #endif // ExecutionContext_h | 194 #endif // ExecutionContext_h |
OLD | NEW |