| 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 17 matching lines...) Expand all Loading... |
| 28 #define WorkerGlobalScope_h | 28 #define WorkerGlobalScope_h |
| 29 | 29 |
| 30 #include "bindings/core/v8/WorkerScriptController.h" | 30 #include "bindings/core/v8/WorkerScriptController.h" |
| 31 #include "core/dom/ExecutionContext.h" | 31 #include "core/dom/ExecutionContext.h" |
| 32 #include "core/events/EventListener.h" | 32 #include "core/events/EventListener.h" |
| 33 #include "core/events/EventTarget.h" | 33 #include "core/events/EventTarget.h" |
| 34 #include "core/frame/DOMWindowBase64.h" | 34 #include "core/frame/DOMWindowBase64.h" |
| 35 #include "core/frame/UseCounter.h" | 35 #include "core/frame/UseCounter.h" |
| 36 #include "core/frame/csp/ContentSecurityPolicy.h" | 36 #include "core/frame/csp/ContentSecurityPolicy.h" |
| 37 #include "core/inspector/ConsoleMessage.h" | 37 #include "core/inspector/ConsoleMessage.h" |
| 38 #include "core/inspector/ConsoleMessageStorage.h" |
| 38 #include "core/workers/WorkerEventQueue.h" | 39 #include "core/workers/WorkerEventQueue.h" |
| 39 #include "platform/heap/Handle.h" | 40 #include "platform/heap/Handle.h" |
| 40 #include "platform/network/ContentSecurityPolicyParsers.h" | 41 #include "platform/network/ContentSecurityPolicyParsers.h" |
| 41 #include "wtf/Assertions.h" | 42 #include "wtf/Assertions.h" |
| 42 #include "wtf/HashMap.h" | 43 #include "wtf/HashMap.h" |
| 43 #include "wtf/OwnPtr.h" | 44 #include "wtf/OwnPtr.h" |
| 44 #include "wtf/PassRefPtr.h" | 45 #include "wtf/PassRefPtr.h" |
| 45 #include "wtf/RefCounted.h" | 46 #include "wtf/RefCounted.h" |
| 46 #include "wtf/RefPtr.h" | 47 #include "wtf/RefPtr.h" |
| 47 #include "wtf/text/AtomicStringHash.h" | 48 #include "wtf/text/AtomicStringHash.h" |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 | 131 |
| 131 bool idleNotification(); | 132 bool idleNotification(); |
| 132 | 133 |
| 133 double timeOrigin() const { return m_timeOrigin; } | 134 double timeOrigin() const { return m_timeOrigin; } |
| 134 | 135 |
| 135 WorkerClients* clients() { return m_workerClients.get(); } | 136 WorkerClients* clients() { return m_workerClients.get(); } |
| 136 | 137 |
| 137 using SecurityContext::securityOrigin; | 138 using SecurityContext::securityOrigin; |
| 138 using SecurityContext::contentSecurityPolicy; | 139 using SecurityContext::contentSecurityPolicy; |
| 139 | 140 |
| 141 ConsoleMessageStorage* messageStorage(); |
| 142 |
| 140 virtual void trace(Visitor*) OVERRIDE; | 143 virtual void trace(Visitor*) OVERRIDE; |
| 141 | 144 |
| 142 protected: | 145 protected: |
| 143 WorkerGlobalScope(const KURL&, const String& userAgent, WorkerThread*, d
ouble timeOrigin, PassOwnPtrWillBeRawPtr<WorkerClients>); | 146 WorkerGlobalScope(const KURL&, const String& userAgent, WorkerThread*, d
ouble timeOrigin, PassOwnPtrWillBeRawPtr<WorkerClients>); |
| 144 void applyContentSecurityPolicyFromString(const String& contentSecurityP
olicy, ContentSecurityPolicyHeaderType); | 147 void applyContentSecurityPolicyFromString(const String& contentSecurityP
olicy, ContentSecurityPolicyHeaderType); |
| 145 | 148 |
| 146 virtual void logExceptionToConsole(const String& errorMessage, const Str
ing& sourceURL, int lineNumber, int columnNumber, PassRefPtrWillBeRawPtr<ScriptC
allStack>) OVERRIDE; | 149 virtual void logExceptionToConsole(const String& errorMessage, const Str
ing& sourceURL, int lineNumber, int columnNumber, PassRefPtrWillBeRawPtr<ScriptC
allStack>) OVERRIDE; |
| 147 void addMessageToWorkerConsole(PassRefPtrWillBeRawPtr<ConsoleMessage>); | 150 void addMessageToWorkerConsole(PassRefPtrWillBeRawPtr<ConsoleMessage>); |
| 148 | 151 |
| 149 private: | 152 private: |
| (...skipping 23 matching lines...) Expand all Loading... |
| 173 | 176 |
| 174 RefPtrWillBeMember<WorkerInspectorController> m_workerInspectorControlle
r; | 177 RefPtrWillBeMember<WorkerInspectorController> m_workerInspectorControlle
r; |
| 175 bool m_closing; | 178 bool m_closing; |
| 176 | 179 |
| 177 OwnPtrWillBeMember<WorkerEventQueue> m_eventQueue; | 180 OwnPtrWillBeMember<WorkerEventQueue> m_eventQueue; |
| 178 | 181 |
| 179 OwnPtrWillBeMember<WorkerClients> m_workerClients; | 182 OwnPtrWillBeMember<WorkerClients> m_workerClients; |
| 180 | 183 |
| 181 double m_timeOrigin; | 184 double m_timeOrigin; |
| 182 TerminationObserver* m_terminationObserver; | 185 TerminationObserver* m_terminationObserver; |
| 186 |
| 187 OwnPtr<ConsoleMessageStorage> m_messageStorage; |
| 183 }; | 188 }; |
| 184 | 189 |
| 185 DEFINE_TYPE_CASTS(WorkerGlobalScope, ExecutionContext, context, context->isWorke
rGlobalScope(), context.isWorkerGlobalScope()); | 190 DEFINE_TYPE_CASTS(WorkerGlobalScope, ExecutionContext, context, context->isWorke
rGlobalScope(), context.isWorkerGlobalScope()); |
| 186 | 191 |
| 187 } // namespace blink | 192 } // namespace blink |
| 188 | 193 |
| 189 #endif // WorkerGlobalScope_h | 194 #endif // WorkerGlobalScope_h |
| OLD | NEW |