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 16 matching lines...) Expand all Loading... |
27 #ifndef WorkerGlobalScope_h | 27 #ifndef WorkerGlobalScope_h |
28 #define WorkerGlobalScope_h | 28 #define WorkerGlobalScope_h |
29 | 29 |
30 #include "bindings/v8/ScriptWrappable.h" | 30 #include "bindings/v8/ScriptWrappable.h" |
31 #include "bindings/v8/WorkerScriptController.h" | 31 #include "bindings/v8/WorkerScriptController.h" |
32 #include "core/dom/ExecutionContext.h" | 32 #include "core/dom/ExecutionContext.h" |
33 #include "core/events/EventListener.h" | 33 #include "core/events/EventListener.h" |
34 #include "core/events/EventTarget.h" | 34 #include "core/events/EventTarget.h" |
35 #include "core/frame/DOMWindowBase64.h" | 35 #include "core/frame/DOMWindowBase64.h" |
36 #include "core/frame/csp/ContentSecurityPolicy.h" | 36 #include "core/frame/csp/ContentSecurityPolicy.h" |
37 #include "core/workers/WorkerConsole.h" | |
38 #include "core/workers/WorkerEventQueue.h" | 37 #include "core/workers/WorkerEventQueue.h" |
39 #include "platform/heap/Handle.h" | 38 #include "platform/heap/Handle.h" |
40 #include "platform/network/ContentSecurityPolicyParsers.h" | 39 #include "platform/network/ContentSecurityPolicyParsers.h" |
41 #include "wtf/Assertions.h" | 40 #include "wtf/Assertions.h" |
42 #include "wtf/HashMap.h" | 41 #include "wtf/HashMap.h" |
43 #include "wtf/OwnPtr.h" | 42 #include "wtf/OwnPtr.h" |
44 #include "wtf/PassRefPtr.h" | 43 #include "wtf/PassRefPtr.h" |
45 #include "wtf/RefCounted.h" | 44 #include "wtf/RefCounted.h" |
46 #include "wtf/RefPtr.h" | 45 #include "wtf/RefPtr.h" |
47 #include "wtf/text/AtomicStringHash.h" | 46 #include "wtf/text/AtomicStringHash.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 // ExecutionContextClient | 113 // ExecutionContextClient |
115 virtual WorkerEventQueue* eventQueue() const OVERRIDE FINAL; | 114 virtual WorkerEventQueue* eventQueue() const OVERRIDE FINAL; |
116 virtual SecurityContext& securityContext() OVERRIDE FINAL { return *this
; } | 115 virtual SecurityContext& securityContext() OVERRIDE FINAL { return *this
; } |
117 | 116 |
118 virtual bool isContextThread() const OVERRIDE FINAL; | 117 virtual bool isContextThread() const OVERRIDE FINAL; |
119 virtual bool isJSExecutionForbidden() const OVERRIDE FINAL; | 118 virtual bool isJSExecutionForbidden() const OVERRIDE FINAL; |
120 | 119 |
121 virtual double timerAlignmentInterval() const OVERRIDE FINAL; | 120 virtual double timerAlignmentInterval() const OVERRIDE FINAL; |
122 | 121 |
123 WorkerInspectorController* workerInspectorController() { return m_worker
InspectorController.get(); } | 122 WorkerInspectorController* workerInspectorController() { return m_worker
InspectorController.get(); } |
124 // These methods are used for GC marking. See JSWorkerGlobalScope::visit
ChildrenVirtual(SlotVisitor&) in | |
125 // JSWorkerGlobalScopeCustom.cpp. | |
126 WorkerConsole* optionalConsole() const { return m_console.get(); } | |
127 WorkerNavigator* optionalNavigator() const { return m_navigator.get(); } | |
128 WorkerLocation* optionalLocation() const { return m_location.get(); } | |
129 | 123 |
130 bool isClosing() { return m_closing; } | 124 bool isClosing() { return m_closing; } |
131 | 125 |
132 virtual void stopFetch() { } | 126 virtual void stopFetch() { } |
133 | 127 |
134 bool idleNotification(); | 128 bool idleNotification(); |
135 | 129 |
136 double timeOrigin() const { return m_timeOrigin; } | 130 double timeOrigin() const { return m_timeOrigin; } |
137 | 131 |
138 WorkerClients* clients() { return m_workerClients.get(); } | 132 WorkerClients* clients() { return m_workerClients.get(); } |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 | 177 |
184 double m_timeOrigin; | 178 double m_timeOrigin; |
185 TerminationObserver* m_terminationObserver; | 179 TerminationObserver* m_terminationObserver; |
186 }; | 180 }; |
187 | 181 |
188 DEFINE_TYPE_CASTS(WorkerGlobalScope, ExecutionContext, context, context->isWorke
rGlobalScope(), context.isWorkerGlobalScope()); | 182 DEFINE_TYPE_CASTS(WorkerGlobalScope, ExecutionContext, context, context->isWorke
rGlobalScope(), context.isWorkerGlobalScope()); |
189 | 183 |
190 } // namespace WebCore | 184 } // namespace WebCore |
191 | 185 |
192 #endif // WorkerGlobalScope_h | 186 #endif // WorkerGlobalScope_h |
OLD | NEW |