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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 virtual bool isWorkerGlobalScope() const { return false; } | 76 virtual bool isWorkerGlobalScope() const { return false; } |
77 virtual bool isWorkletGlobalScope() const { return false; } | 77 virtual bool isWorkletGlobalScope() const { return false; } |
78 virtual bool isDedicatedWorkerGlobalScope() const { return false; } | 78 virtual bool isDedicatedWorkerGlobalScope() const { return false; } |
79 virtual bool isSharedWorkerGlobalScope() const { return false; } | 79 virtual bool isSharedWorkerGlobalScope() const { return false; } |
80 virtual bool isServiceWorkerGlobalScope() const { return false; } | 80 virtual bool isServiceWorkerGlobalScope() const { return false; } |
81 virtual bool isCompositorWorkerGlobalScope() const { return false; } | 81 virtual bool isCompositorWorkerGlobalScope() const { return false; } |
82 virtual bool isJSExecutionForbidden() const { return false; } | 82 virtual bool isJSExecutionForbidden() const { return false; } |
83 | 83 |
84 virtual bool isContextThread() const { return true; } | 84 virtual bool isContextThread() const { return true; } |
85 | 85 |
86 SecurityOrigin* securityOrigin(); | 86 SecurityOrigin* getSecurityOrigin(); |
87 ContentSecurityPolicy* contentSecurityPolicy(); | 87 ContentSecurityPolicy* contentSecurityPolicy(); |
88 const KURL& url() const; | 88 const KURL& url() const; |
89 KURL completeURL(const String& url) const; | 89 KURL completeURL(const String& url) const; |
90 virtual void disableEval(const String& errorMessage) = 0; | 90 virtual void disableEval(const String& errorMessage) = 0; |
91 virtual LocalDOMWindow* executingWindow() { return 0; } | 91 virtual LocalDOMWindow* executingWindow() { return 0; } |
92 virtual String userAgent() const = 0; | 92 virtual String userAgent() const = 0; |
93 virtual void postTask(const WebTraceLocation&, PassOwnPtr<ExecutionContextTa
sk>) = 0; // Executes the task on context's thread asynchronously. | 93 virtual void postTask(const WebTraceLocation&, PassOwnPtr<ExecutionContextTa
sk>) = 0; // Executes the task on context's thread asynchronously. |
94 | 94 |
95 // Gets the DOMTimerCoordinator which maintains the "active timer | 95 // Gets the DOMTimerCoordinator which maintains the "active timer |
96 // list" of tasks created by setTimeout and setInterval. The | 96 // list" of tasks created by setTimeout and setInterval. The |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 void suspendActiveDOMObjectIfNeeded(ActiveDOMObject*); | 133 void suspendActiveDOMObjectIfNeeded(ActiveDOMObject*); |
134 #if !ENABLE(OILPAN) | 134 #if !ENABLE(OILPAN) |
135 void ref() { refExecutionContext(); } | 135 void ref() { refExecutionContext(); } |
136 void deref() { derefExecutionContext(); } | 136 void deref() { derefExecutionContext(); } |
137 #endif | 137 #endif |
138 | 138 |
139 // Gets the next id in a circular sequence from 1 to 2^31-1. | 139 // Gets the next id in a circular sequence from 1 to 2^31-1. |
140 int circularSequentialID(); | 140 int circularSequentialID(); |
141 | 141 |
142 virtual EventTarget* errorEventTarget() = 0; | 142 virtual EventTarget* errorEventTarget() = 0; |
143 virtual EventQueue* eventQueue() const = 0; | 143 virtual EventQueue* getEventQueue() const = 0; |
144 | 144 |
145 // Methods related to window interaction. It should be used to manage window | 145 // Methods related to window interaction. It should be used to manage window |
146 // focusing and window creation permission for an ExecutionContext. | 146 // focusing and window creation permission for an ExecutionContext. |
147 void allowWindowInteraction(); | 147 void allowWindowInteraction(); |
148 void consumeWindowInteraction(); | 148 void consumeWindowInteraction(); |
149 bool isWindowInteractionAllowed() const; | 149 bool isWindowInteractionAllowed() const; |
150 | 150 |
151 // Decides whether this context is privileged, as described in | 151 // Decides whether this context is privileged, as described in |
152 // https://w3c.github.io/webappsec/specs/powerfulfeatures/#settings-privileg
ed. | 152 // https://w3c.github.io/webappsec/specs/powerfulfeatures/#settings-privileg
ed. |
153 virtual bool isSecureContext(String& errorMessage, const SecureContextCheck
= StandardSecureContextCheck) const = 0; | 153 virtual bool isSecureContext(String& errorMessage, const SecureContextCheck
= StandardSecureContextCheck) const = 0; |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 | 195 |
196 Deque<OwnPtr<SuspendableTask>> m_suspendedTasks; | 196 Deque<OwnPtr<SuspendableTask>> m_suspendedTasks; |
197 bool m_isRunSuspendableTasksScheduled; | 197 bool m_isRunSuspendableTasksScheduled; |
198 | 198 |
199 ReferrerPolicy m_referrerPolicy; | 199 ReferrerPolicy m_referrerPolicy; |
200 }; | 200 }; |
201 | 201 |
202 } // namespace blink | 202 } // namespace blink |
203 | 203 |
204 #endif // ExecutionContext_h | 204 #endif // ExecutionContext_h |
OLD | NEW |