| 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 11 matching lines...) Expand all Loading... |
| 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 * | 24 * |
| 25 */ | 25 */ |
| 26 | 26 |
| 27 #ifndef WorkerGlobalScope_h | 27 #ifndef WorkerGlobalScope_h |
| 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/dom/RequestAnimationFrameCallback.h" |
| 32 #include "core/events/EventListener.h" | 33 #include "core/events/EventListener.h" |
| 33 #include "core/events/EventTarget.h" | 34 #include "core/events/EventTarget.h" |
| 34 #include "core/frame/DOMWindowBase64.h" | 35 #include "core/frame/DOMWindowBase64.h" |
| 35 #include "core/frame/UseCounter.h" | 36 #include "core/frame/UseCounter.h" |
| 36 #include "core/frame/csp/ContentSecurityPolicy.h" | 37 #include "core/frame/csp/ContentSecurityPolicy.h" |
| 37 #include "core/workers/WorkerEventQueue.h" | 38 #include "core/workers/WorkerEventQueue.h" |
| 38 #include "platform/heap/Handle.h" | 39 #include "platform/heap/Handle.h" |
| 39 #include "platform/network/ContentSecurityPolicyParsers.h" | 40 #include "platform/network/ContentSecurityPolicyParsers.h" |
| 40 #include "wtf/Assertions.h" | 41 #include "wtf/Assertions.h" |
| 42 #include "wtf/Functional.h" |
| 41 #include "wtf/HashMap.h" | 43 #include "wtf/HashMap.h" |
| 42 #include "wtf/OwnPtr.h" | 44 #include "wtf/OwnPtr.h" |
| 43 #include "wtf/PassRefPtr.h" | 45 #include "wtf/PassRefPtr.h" |
| 44 #include "wtf/RefCounted.h" | 46 #include "wtf/RefCounted.h" |
| 45 #include "wtf/RefPtr.h" | 47 #include "wtf/RefPtr.h" |
| 48 #include "wtf/Vector.h" |
| 46 #include "wtf/text/AtomicStringHash.h" | 49 #include "wtf/text/AtomicStringHash.h" |
| 47 | 50 |
| 48 namespace blink { | 51 namespace blink { |
| 49 | 52 |
| 50 class Blob; | 53 class Blob; |
| 51 class ExceptionState; | 54 class ExceptionState; |
| 55 class ListOfElements; |
| 52 class ScheduledAction; | 56 class ScheduledAction; |
| 53 class WorkerClients; | 57 class WorkerClients; |
| 54 class WorkerConsole; | 58 class WorkerConsole; |
| 55 class WorkerInspectorController; | 59 class WorkerInspectorController; |
| 56 class WorkerLocation; | 60 class WorkerLocation; |
| 57 class WorkerNavigator; | 61 class WorkerNavigator; |
| 58 class WorkerThread; | 62 class WorkerThread; |
| 63 class RequestAnimationFrameCallback; |
| 59 | 64 |
| 60 class WorkerGlobalScope : public RefCountedWillBeRefCountedGarbageCollected<
WorkerGlobalScope>, public SecurityContext, public ExecutionContext, public Exec
utionContextClient, public WillBeHeapSupplementable<WorkerGlobalScope>, public E
ventTargetWithInlineData, public DOMWindowBase64 { | 65 class WorkerGlobalScope : public RefCountedWillBeRefCountedGarbageCollected<
WorkerGlobalScope>, public SecurityContext, public ExecutionContext, public Exec
utionContextClient, public WillBeHeapSupplementable<WorkerGlobalScope>, public E
ventTargetWithInlineData, public DOMWindowBase64 { |
| 61 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(WorkerGlobalScope); | 66 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(WorkerGlobalScope); |
| 62 REFCOUNTED_EVENT_TARGET(WorkerGlobalScope); | 67 REFCOUNTED_EVENT_TARGET(WorkerGlobalScope); |
| 63 public: | 68 public: |
| 64 virtual ~WorkerGlobalScope(); | 69 virtual ~WorkerGlobalScope(); |
| 65 | 70 |
| 71 OwnPtr<Vector<OwnPtr<RequestAnimationFrameCallback> > > rAFPendingList; |
| 72 void requestAnimationFrame(PassOwnPtr<RequestAnimationFrameCallback> ins
ert); |
| 73 void processRAF(double monotonicAnimationStartTime); |
| 74 void processRAFOnWorkerThread(double monotonicAnimationStartTime); |
| 75 |
| 76 |
| 66 virtual bool isWorkerGlobalScope() const OVERRIDE FINAL { return true; } | 77 virtual bool isWorkerGlobalScope() const OVERRIDE FINAL { return true; } |
| 67 | 78 |
| 68 virtual ExecutionContext* executionContext() const OVERRIDE FINAL; | 79 virtual ExecutionContext* executionContext() const OVERRIDE FINAL; |
| 69 | 80 |
| 70 virtual bool isSharedWorkerGlobalScope() const { return false; } | 81 virtual bool isSharedWorkerGlobalScope() const { return false; } |
| 71 virtual bool isDedicatedWorkerGlobalScope() const { return false; } | 82 virtual bool isDedicatedWorkerGlobalScope() const { return false; } |
| 72 virtual bool isServiceWorkerGlobalScope() const { return false; } | 83 virtual bool isServiceWorkerGlobalScope() const { return false; } |
| 73 virtual void countFeature(UseCounter::Feature) const; | 84 virtual void countFeature(UseCounter::Feature) const; |
| 74 virtual void countDeprecation(UseCounter::Feature) const; | 85 virtual void countDeprecation(UseCounter::Feature) const; |
| 75 | 86 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 | 190 |
| 180 double m_timeOrigin; | 191 double m_timeOrigin; |
| 181 TerminationObserver* m_terminationObserver; | 192 TerminationObserver* m_terminationObserver; |
| 182 }; | 193 }; |
| 183 | 194 |
| 184 DEFINE_TYPE_CASTS(WorkerGlobalScope, ExecutionContext, context, context->isWorke
rGlobalScope(), context.isWorkerGlobalScope()); | 195 DEFINE_TYPE_CASTS(WorkerGlobalScope, ExecutionContext, context, context->isWorke
rGlobalScope(), context.isWorkerGlobalScope()); |
| 185 | 196 |
| 186 } // namespace blink | 197 } // namespace blink |
| 187 | 198 |
| 188 #endif // WorkerGlobalScope_h | 199 #endif // WorkerGlobalScope_h |
| OLD | NEW |