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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 bool isWorkerGlobalScope() const { return m_client && m_client->isWorkerGlob
alScope(); } | 67 bool isWorkerGlobalScope() const { return m_client && m_client->isWorkerGlob
alScope(); } |
68 bool isJSExecutionForbidden() { return m_client && m_client->isJSExecutionFo
rbidden(); } | 68 bool isJSExecutionForbidden() { return m_client && m_client->isJSExecutionFo
rbidden(); } |
69 SecurityOrigin* securityOrigin() const; | 69 SecurityOrigin* securityOrigin() const; |
70 ContentSecurityPolicy* contentSecurityPolicy() const; | 70 ContentSecurityPolicy* contentSecurityPolicy() const; |
71 const KURL& url() const; | 71 const KURL& url() const; |
72 KURL completeURL(const String& url) const; | 72 KURL completeURL(const String& url) const; |
73 void disableEval(const String& errorMessage); | 73 void disableEval(const String& errorMessage); |
74 LocalDOMWindow* executingWindow() const; | 74 LocalDOMWindow* executingWindow() const; |
75 String userAgent(const KURL&) const; | 75 String userAgent(const KURL&) const; |
76 void postTask(PassOwnPtr<ExecutionContextTask>); | 76 void postTask(PassOwnPtr<ExecutionContextTask>); |
77 void postTask(const Closure&); | |
78 double timerAlignmentInterval() const; | 77 double timerAlignmentInterval() const; |
79 | 78 |
80 virtual void reportBlockedScriptExecutionToInspector(const String& directive
Text) = 0; | 79 virtual void reportBlockedScriptExecutionToInspector(const String& directive
Text) = 0; |
81 | 80 |
82 virtual SecurityContext& securityContext() = 0; | 81 virtual SecurityContext& securityContext() = 0; |
83 KURL contextURL() const { return virtualURL(); } | 82 KURL contextURL() const { return virtualURL(); } |
84 KURL contextCompleteURL(const String& url) const { return virtualCompleteURL
(url); } | 83 KURL contextCompleteURL(const String& url) const { return virtualCompleteURL
(url); } |
85 | 84 |
86 bool shouldSanitizeScriptError(const String& sourceURL, AccessControlStatus)
; | 85 bool shouldSanitizeScriptError(const String& sourceURL, AccessControlStatus)
; |
87 void reportException(PassRefPtrWillBeRawPtr<ErrorEvent>, PassRefPtrWillBeRaw
Ptr<ScriptCallStack>, AccessControlStatus); | 86 void reportException(PassRefPtrWillBeRawPtr<ErrorEvent>, PassRefPtrWillBeRaw
Ptr<ScriptCallStack>, AccessControlStatus); |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 | 170 |
172 // The location of this member is important; to make sure contextDestroyed()
notification on | 171 // The location of this member is important; to make sure contextDestroyed()
notification on |
173 // ExecutionContext's members (notably m_timeouts) is called before they are
destructed, | 172 // ExecutionContext's members (notably m_timeouts) is called before they are
destructed, |
174 // m_lifecycleNotifer should be placed *after* such members. | 173 // m_lifecycleNotifer should be placed *after* such members. |
175 OwnPtr<ContextLifecycleNotifier> m_lifecycleNotifier; | 174 OwnPtr<ContextLifecycleNotifier> m_lifecycleNotifier; |
176 }; | 175 }; |
177 | 176 |
178 } // namespace WebCore | 177 } // namespace WebCore |
179 | 178 |
180 #endif // ExecutionContext_h | 179 #endif // ExecutionContext_h |
OLD | NEW |