| 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 13 matching lines...) Expand all  Loading... | 
| 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/events/EventListener.h" | 32 #include "core/events/EventListener.h" | 
| 33 #include "core/events/EventTarget.h" | 33 #include "core/events/EventTarget.h" | 
|  | 34 #include "core/fetch/CachedMetadataHandler.h" | 
| 34 #include "core/frame/DOMTimerCoordinator.h" | 35 #include "core/frame/DOMTimerCoordinator.h" | 
| 35 #include "core/frame/DOMWindowBase64.h" | 36 #include "core/frame/DOMWindowBase64.h" | 
| 36 #include "core/frame/UseCounter.h" | 37 #include "core/frame/UseCounter.h" | 
| 37 #include "core/frame/csp/ContentSecurityPolicy.h" | 38 #include "core/frame/csp/ContentSecurityPolicy.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" | 
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 92     // WorkerGlobalScope | 93     // WorkerGlobalScope | 
| 93     WorkerGlobalScope* self() { return this; } | 94     WorkerGlobalScope* self() { return this; } | 
| 94     WorkerConsole* console(); | 95     WorkerConsole* console(); | 
| 95     WorkerLocation* location() const; | 96     WorkerLocation* location() const; | 
| 96     void close(); | 97     void close(); | 
| 97 | 98 | 
| 98     DEFINE_ATTRIBUTE_EVENT_LISTENER(error); | 99     DEFINE_ATTRIBUTE_EVENT_LISTENER(error); | 
| 99 | 100 | 
| 100     // WorkerUtils | 101     // WorkerUtils | 
| 101     virtual void importScripts(const Vector<String>& urls, ExceptionState&); | 102     virtual void importScripts(const Vector<String>& urls, ExceptionState&); | 
|  | 103     // Returns null if caching is not supported. | 
|  | 104     virtual PassOwnPtr<CachedMetadataHandler> createWorkerScriptCachedMetadataHa
     ndler(const KURL& scriptURL, const Vector<char>* metaData) { return nullptr; } | 
|  | 105 | 
| 102     WorkerNavigator* navigator() const; | 106     WorkerNavigator* navigator() const; | 
| 103 | 107 | 
| 104     // ExecutionContextClient | 108     // ExecutionContextClient | 
| 105     virtual WorkerEventQueue* eventQueue() const override final; | 109     virtual WorkerEventQueue* eventQueue() const override final; | 
| 106     virtual SecurityContext& securityContext() override final { return *this; } | 110     virtual SecurityContext& securityContext() override final { return *this; } | 
| 107 | 111 | 
| 108     virtual bool isContextThread() const override final; | 112     virtual bool isContextThread() const override final; | 
| 109     virtual bool isJSExecutionForbidden() const override final; | 113     virtual bool isJSExecutionForbidden() const override final; | 
| 110 | 114 | 
| 111     virtual double timerAlignmentInterval() const override final; | 115     virtual double timerAlignmentInterval() const override final; | 
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 179 | 183 | 
| 180     unsigned long m_workerExceptionUniqueIdentifier; | 184     unsigned long m_workerExceptionUniqueIdentifier; | 
| 181     WillBeHeapHashMap<unsigned long, RefPtrWillBeMember<ConsoleMessage>> m_pendi
     ngMessages; | 185     WillBeHeapHashMap<unsigned long, RefPtrWillBeMember<ConsoleMessage>> m_pendi
     ngMessages; | 
| 182 }; | 186 }; | 
| 183 | 187 | 
| 184 DEFINE_TYPE_CASTS(WorkerGlobalScope, ExecutionContext, context, context->isWorke
     rGlobalScope(), context.isWorkerGlobalScope()); | 188 DEFINE_TYPE_CASTS(WorkerGlobalScope, ExecutionContext, context, context->isWorke
     rGlobalScope(), context.isWorkerGlobalScope()); | 
| 185 | 189 | 
| 186 } // namespace blink | 190 } // namespace blink | 
| 187 | 191 | 
| 188 #endif // WorkerGlobalScope_h | 192 #endif // WorkerGlobalScope_h | 
| OLD | NEW | 
|---|