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 15 matching lines...) Expand all Loading... |
26 | 26 |
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/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" |
41 #include "wtf/HashMap.h" | 42 #include "wtf/HashMap.h" |
42 #include "wtf/OwnPtr.h" | 43 #include "wtf/OwnPtr.h" |
43 #include "wtf/PassRefPtr.h" | 44 #include "wtf/PassRefPtr.h" |
44 #include "wtf/RefCounted.h" | 45 #include "wtf/RefCounted.h" |
45 #include "wtf/RefPtr.h" | 46 #include "wtf/RefPtr.h" |
(...skipping 17 matching lines...) Expand all Loading... |
63 public: | 64 public: |
64 virtual ~WorkerGlobalScope(); | 65 virtual ~WorkerGlobalScope(); |
65 | 66 |
66 virtual bool isWorkerGlobalScope() const OVERRIDE FINAL { return true; } | 67 virtual bool isWorkerGlobalScope() const OVERRIDE FINAL { return true; } |
67 | 68 |
68 virtual ExecutionContext* executionContext() const OVERRIDE FINAL; | 69 virtual ExecutionContext* executionContext() const OVERRIDE FINAL; |
69 | 70 |
70 virtual bool isSharedWorkerGlobalScope() const { return false; } | 71 virtual bool isSharedWorkerGlobalScope() const { return false; } |
71 virtual bool isDedicatedWorkerGlobalScope() const { return false; } | 72 virtual bool isDedicatedWorkerGlobalScope() const { return false; } |
72 virtual bool isServiceWorkerGlobalScope() const { return false; } | 73 virtual bool isServiceWorkerGlobalScope() const { return false; } |
| 74 virtual void countFeature(UseCounter::Feature) const; |
73 | 75 |
74 const KURL& url() const { return m_url; } | 76 const KURL& url() const { return m_url; } |
75 KURL completeURL(const String&) const; | 77 KURL completeURL(const String&) const; |
76 | 78 |
77 virtual String userAgent(const KURL&) const OVERRIDE FINAL; | 79 virtual String userAgent(const KURL&) const OVERRIDE FINAL; |
78 virtual void disableEval(const String& errorMessage) OVERRIDE FINAL; | 80 virtual void disableEval(const String& errorMessage) OVERRIDE FINAL; |
79 | 81 |
80 WorkerScriptController* script() { return m_script.get(); } | 82 WorkerScriptController* script() { return m_script.get(); } |
81 void clearScript() { m_script.clear(); } | 83 void clearScript() { m_script.clear(); } |
82 void clearInspector(); | 84 void clearInspector(); |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 | 179 |
178 double m_timeOrigin; | 180 double m_timeOrigin; |
179 TerminationObserver* m_terminationObserver; | 181 TerminationObserver* m_terminationObserver; |
180 }; | 182 }; |
181 | 183 |
182 DEFINE_TYPE_CASTS(WorkerGlobalScope, ExecutionContext, context, context->isWorke
rGlobalScope(), context.isWorkerGlobalScope()); | 184 DEFINE_TYPE_CASTS(WorkerGlobalScope, ExecutionContext, context, context->isWorke
rGlobalScope(), context.isWorkerGlobalScope()); |
183 | 185 |
184 } // namespace WebCore | 186 } // namespace WebCore |
185 | 187 |
186 #endif // WorkerGlobalScope_h | 188 #endif // WorkerGlobalScope_h |
OLD | NEW |