| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 virtual const SecurityOrigin* topOrigin() const OVERRIDE { return m_topO
rigin.get(); } | 130 virtual const SecurityOrigin* topOrigin() const OVERRIDE { return m_topO
rigin.get(); } |
| 131 | 131 |
| 132 double timeOrigin() const { return m_timeOrigin; } | 132 double timeOrigin() const { return m_timeOrigin; } |
| 133 | 133 |
| 134 WorkerClients* clients() { return m_workerClients.get(); } | 134 WorkerClients* clients() { return m_workerClients.get(); } |
| 135 | 135 |
| 136 protected: | 136 protected: |
| 137 WorkerGlobalScope(const KURL&, const String& userAgent, WorkerThread*, P
assRefPtr<SecurityOrigin> topOrigin, double timeOrigin, PassOwnPtr<WorkerClients
>); | 137 WorkerGlobalScope(const KURL&, const String& userAgent, WorkerThread*, P
assRefPtr<SecurityOrigin> topOrigin, double timeOrigin, PassOwnPtr<WorkerClients
>); |
| 138 void applyContentSecurityPolicyFromString(const String& contentSecurityP
olicy, ContentSecurityPolicy::HeaderType); | 138 void applyContentSecurityPolicyFromString(const String& contentSecurityP
olicy, ContentSecurityPolicy::HeaderType); |
| 139 | 139 |
| 140 virtual void logExceptionToConsole(const String& errorMessage, const Str
ing& sourceURL, int lineNumber, PassRefPtr<ScriptCallStack>) OVERRIDE; | 140 virtual void logExceptionToConsole(const String& errorMessage, const Str
ing& sourceURL, int lineNumber, int columnNumber, PassRefPtr<ScriptCallStack>) O
VERRIDE; |
| 141 void addMessageToWorkerConsole(MessageSource, MessageLevel, const String
& message, const String& sourceURL, unsigned lineNumber, PassRefPtr<ScriptCallSt
ack>, ScriptState* = 0, unsigned long requestIdentifier = 0); | 141 void addMessageToWorkerConsole(MessageSource, MessageLevel, const String
& message, const String& sourceURL, unsigned lineNumber, PassRefPtr<ScriptCallSt
ack>, ScriptState* = 0, unsigned long requestIdentifier = 0); |
| 142 | 142 |
| 143 private: | 143 private: |
| 144 virtual void refScriptExecutionContext() OVERRIDE { ref(); } | 144 virtual void refScriptExecutionContext() OVERRIDE { ref(); } |
| 145 virtual void derefScriptExecutionContext() OVERRIDE { deref(); } | 145 virtual void derefScriptExecutionContext() OVERRIDE { deref(); } |
| 146 | 146 |
| 147 virtual void refEventTarget() OVERRIDE { ref(); } | 147 virtual void refEventTarget() OVERRIDE { ref(); } |
| 148 virtual void derefEventTarget() OVERRIDE { deref(); } | 148 virtual void derefEventTarget() OVERRIDE { deref(); } |
| 149 virtual EventTargetData* eventTargetData() OVERRIDE; | 149 virtual EventTargetData* eventTargetData() OVERRIDE; |
| 150 virtual EventTargetData* ensureEventTargetData() OVERRIDE; | 150 virtual EventTargetData* ensureEventTargetData() OVERRIDE; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 | 184 |
| 185 inline WorkerGlobalScope* toWorkerGlobalScope(ScriptExecutionContext* context) | 185 inline WorkerGlobalScope* toWorkerGlobalScope(ScriptExecutionContext* context) |
| 186 { | 186 { |
| 187 ASSERT_WITH_SECURITY_IMPLICATION(!context || context->isWorkerGlobalScope())
; | 187 ASSERT_WITH_SECURITY_IMPLICATION(!context || context->isWorkerGlobalScope())
; |
| 188 return static_cast<WorkerGlobalScope*>(context); | 188 return static_cast<WorkerGlobalScope*>(context); |
| 189 } | 189 } |
| 190 | 190 |
| 191 } // namespace WebCore | 191 } // namespace WebCore |
| 192 | 192 |
| 193 #endif // WorkerGlobalScope_h | 193 #endif // WorkerGlobalScope_h |
| OLD | NEW |