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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 PublicURLManager; | 56 class PublicURLManager; |
57 class SecurityOrigin; | 57 class SecurityOrigin; |
58 class ScriptCallStack; | 58 class SourceLocation; |
59 | 59 |
60 class CORE_EXPORT ExecutionContext : public ContextLifecycleNotifier, public Sup
plementable<ExecutionContext> { | 60 class CORE_EXPORT ExecutionContext : public ContextLifecycleNotifier, public Sup
plementable<ExecutionContext> { |
61 WTF_MAKE_NONCOPYABLE(ExecutionContext); | 61 WTF_MAKE_NONCOPYABLE(ExecutionContext); |
62 public: | 62 public: |
63 DECLARE_VIRTUAL_TRACE(); | 63 DECLARE_VIRTUAL_TRACE(); |
64 | 64 |
65 // Used to specify whether |isSecureContext| should walk the | 65 // Used to specify whether |isSecureContext| should walk the |
66 // ancestor tree to decide whether to restrict usage of a powerful | 66 // ancestor tree to decide whether to restrict usage of a powerful |
67 // feature. | 67 // feature. |
68 enum SecureContextCheck { | 68 enum SecureContextCheck { |
(...skipping 28 matching lines...) Expand all Loading... |
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 SecurityContext& securityContext() = 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(ErrorEvent*, int scriptId, PassRefPtr<ScriptCallStack>,
AccessControlStatus); | 107 void reportException(ErrorEvent*, PassOwnPtr<SourceLocation>, AccessControlS
tatus); |
108 | 108 |
109 virtual void addConsoleMessage(ConsoleMessage*) = 0; | 109 virtual void addConsoleMessage(ConsoleMessage*) = 0; |
110 virtual void logExceptionToConsole(const String& errorMessage, int scriptId,
const String& sourceURL, int lineNumber, int columnNumber, PassRefPtr<ScriptCal
lStack>) = 0; | 110 virtual void logExceptionToConsole(const String& errorMessage, PassOwnPtr<So
urceLocation>) = 0; |
111 | 111 |
112 PublicURLManager& publicURLManager(); | 112 PublicURLManager& publicURLManager(); |
113 | 113 |
114 virtual void removeURLFromMemoryCache(const KURL&); | 114 virtual void removeURLFromMemoryCache(const KURL&); |
115 | 115 |
116 void suspendActiveDOMObjects(); | 116 void suspendActiveDOMObjects(); |
117 void resumeActiveDOMObjects(); | 117 void resumeActiveDOMObjects(); |
118 void stopActiveDOMObjects(); | 118 void stopActiveDOMObjects(); |
119 void postSuspendableTask(PassOwnPtr<SuspendableTask>); | 119 void postSuspendableTask(PassOwnPtr<SuspendableTask>); |
120 void notifyContextDestroyed() override; | 120 void notifyContextDestroyed() override; |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 | 182 |
183 Deque<OwnPtr<SuspendableTask>> m_suspendedTasks; | 183 Deque<OwnPtr<SuspendableTask>> m_suspendedTasks; |
184 bool m_isRunSuspendableTasksScheduled; | 184 bool m_isRunSuspendableTasksScheduled; |
185 | 185 |
186 ReferrerPolicy m_referrerPolicy; | 186 ReferrerPolicy m_referrerPolicy; |
187 }; | 187 }; |
188 | 188 |
189 } // namespace blink | 189 } // namespace blink |
190 | 190 |
191 #endif // ExecutionContext_h | 191 #endif // ExecutionContext_h |
OLD | NEW |