| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 #include "wtf/RefPtr.h" | 50 #include "wtf/RefPtr.h" |
| 51 #include "wtf/text/AtomicStringHash.h" | 51 #include "wtf/text/AtomicStringHash.h" |
| 52 | 52 |
| 53 namespace blink { | 53 namespace blink { |
| 54 | 54 |
| 55 class ConsoleMessage; | 55 class ConsoleMessage; |
| 56 class ConsoleMessageStorage; | 56 class ConsoleMessageStorage; |
| 57 class ExceptionState; | 57 class ExceptionState; |
| 58 class V8AbstractEventListener; | 58 class V8AbstractEventListener; |
| 59 class WorkerClients; | 59 class WorkerClients; |
| 60 class WorkerConsole; | |
| 61 class WorkerInspectorController; | 60 class WorkerInspectorController; |
| 62 class WorkerLocation; | 61 class WorkerLocation; |
| 63 class WorkerNavigator; | 62 class WorkerNavigator; |
| 64 class WorkerThread; | 63 class WorkerThread; |
| 65 | 64 |
| 66 class CORE_EXPORT WorkerGlobalScope : public EventTargetWithInlineData, public S
ecurityContext, public WorkerOrWorkletGlobalScope, public Supplementable<WorkerG
lobalScope>, public DOMWindowBase64 { | 65 class CORE_EXPORT WorkerGlobalScope : public EventTargetWithInlineData, public S
ecurityContext, public WorkerOrWorkletGlobalScope, public Supplementable<WorkerG
lobalScope>, public DOMWindowBase64 { |
| 67 DEFINE_WRAPPERTYPEINFO(); | 66 DEFINE_WRAPPERTYPEINFO(); |
| 68 REFCOUNTED_EVENT_TARGET(WorkerGlobalScope); | 67 REFCOUNTED_EVENT_TARGET(WorkerGlobalScope); |
| 69 USING_GARBAGE_COLLECTED_MIXIN(WorkerGlobalScope); | 68 USING_GARBAGE_COLLECTED_MIXIN(WorkerGlobalScope); |
| 70 public: | 69 public: |
| (...skipping 20 matching lines...) Expand all Loading... |
| 91 | 90 |
| 92 virtual void didEvaluateWorkerScript(); | 91 virtual void didEvaluateWorkerScript(); |
| 93 void dispose(); | 92 void dispose(); |
| 94 | 93 |
| 95 WorkerThread* thread() const { return m_thread; } | 94 WorkerThread* thread() const { return m_thread; } |
| 96 | 95 |
| 97 void postTask(const WebTraceLocation&, PassOwnPtr<ExecutionContextTask>) fin
al; // Executes the task on context's thread asynchronously. | 96 void postTask(const WebTraceLocation&, PassOwnPtr<ExecutionContextTask>) fin
al; // Executes the task on context's thread asynchronously. |
| 98 | 97 |
| 99 // WorkerGlobalScope | 98 // WorkerGlobalScope |
| 100 WorkerGlobalScope* self() { return this; } | 99 WorkerGlobalScope* self() { return this; } |
| 101 WorkerConsole* console(); | |
| 102 WorkerLocation* location() const; | 100 WorkerLocation* location() const; |
| 103 void close(); | 101 void close(); |
| 104 | 102 |
| 105 DEFINE_ATTRIBUTE_EVENT_LISTENER(error); | 103 DEFINE_ATTRIBUTE_EVENT_LISTENER(error); |
| 106 DEFINE_ATTRIBUTE_EVENT_LISTENER(rejectionhandled); | 104 DEFINE_ATTRIBUTE_EVENT_LISTENER(rejectionhandled); |
| 107 DEFINE_ATTRIBUTE_EVENT_LISTENER(unhandledrejection); | 105 DEFINE_ATTRIBUTE_EVENT_LISTENER(unhandledrejection); |
| 108 | 106 |
| 109 // WorkerUtils | 107 // WorkerUtils |
| 110 virtual void importScripts(const Vector<String>& urls, ExceptionState&); | 108 virtual void importScripts(const Vector<String>& urls, ExceptionState&); |
| 111 // Returns null if caching is not supported. | 109 // Returns null if caching is not supported. |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 | 170 |
| 173 void clearScript(); | 171 void clearScript(); |
| 174 void clearInspector(); | 172 void clearInspector(); |
| 175 | 173 |
| 176 static void removeURLFromMemoryCacheInternal(const KURL&); | 174 static void removeURLFromMemoryCacheInternal(const KURL&); |
| 177 | 175 |
| 178 KURL m_url; | 176 KURL m_url; |
| 179 String m_userAgent; | 177 String m_userAgent; |
| 180 V8CacheOptions m_v8CacheOptions; | 178 V8CacheOptions m_v8CacheOptions; |
| 181 | 179 |
| 182 mutable Member<WorkerConsole> m_console; | |
| 183 mutable Member<WorkerLocation> m_location; | 180 mutable Member<WorkerLocation> m_location; |
| 184 mutable Member<WorkerNavigator> m_navigator; | 181 mutable Member<WorkerNavigator> m_navigator; |
| 185 | 182 |
| 186 mutable UseCounter::CountBits m_deprecationWarningBits; | 183 mutable UseCounter::CountBits m_deprecationWarningBits; |
| 187 | 184 |
| 188 Member<WorkerOrWorkletScriptController> m_scriptController; | 185 Member<WorkerOrWorkletScriptController> m_scriptController; |
| 189 WorkerThread* m_thread; | 186 WorkerThread* m_thread; |
| 190 | 187 |
| 191 Member<WorkerInspectorController> m_workerInspectorController; | 188 Member<WorkerInspectorController> m_workerInspectorController; |
| 192 bool m_closing; | 189 bool m_closing; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 204 unsigned long m_workerExceptionUniqueIdentifier; | 201 unsigned long m_workerExceptionUniqueIdentifier; |
| 205 HeapHashMap<unsigned long, Member<ConsoleMessage>> m_pendingMessages; | 202 HeapHashMap<unsigned long, Member<ConsoleMessage>> m_pendingMessages; |
| 206 HeapListHashSet<Member<V8AbstractEventListener>> m_eventListeners; | 203 HeapListHashSet<Member<V8AbstractEventListener>> m_eventListeners; |
| 207 }; | 204 }; |
| 208 | 205 |
| 209 DEFINE_TYPE_CASTS(WorkerGlobalScope, ExecutionContext, context, context->isWorke
rGlobalScope(), context.isWorkerGlobalScope()); | 206 DEFINE_TYPE_CASTS(WorkerGlobalScope, ExecutionContext, context, context->isWorke
rGlobalScope(), context.isWorkerGlobalScope()); |
| 210 | 207 |
| 211 } // namespace blink | 208 } // namespace blink |
| 212 | 209 |
| 213 #endif // WorkerGlobalScope_h | 210 #endif // WorkerGlobalScope_h |
| OLD | NEW |