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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 class ConsoleMessageStorage; | 52 class ConsoleMessageStorage; |
53 class ExceptionState; | 53 class ExceptionState; |
54 class ScheduledAction; | 54 class ScheduledAction; |
55 class WorkerClients; | 55 class WorkerClients; |
56 class WorkerConsole; | 56 class WorkerConsole; |
57 class WorkerInspectorController; | 57 class WorkerInspectorController; |
58 class WorkerLocation; | 58 class WorkerLocation; |
59 class WorkerNavigator; | 59 class WorkerNavigator; |
60 class WorkerThread; | 60 class WorkerThread; |
61 | 61 |
62 class WorkerGlobalScope : public RefCountedWillBeGarbageCollectedFinalized<Worke
rGlobalScope>, public SecurityContext, public ExecutionContext, public Execution
ContextClient, public WillBeHeapSupplementable<WorkerGlobalScope>, public EventT
argetWithInlineData, public DOMWindowBase64 { | 62 class WorkerGlobalScope : public RefCountedWillBeGarbageCollectedFinalized<Worke
rGlobalScope>, public SecurityContext, public ExecutionContext, public WillBeHea
pSupplementable<WorkerGlobalScope>, public EventTargetWithInlineData, public DOM
WindowBase64 { |
63 DEFINE_WRAPPERTYPEINFO(); | 63 DEFINE_WRAPPERTYPEINFO(); |
64 REFCOUNTED_EVENT_TARGET(WorkerGlobalScope); | 64 REFCOUNTED_EVENT_TARGET(WorkerGlobalScope); |
65 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(WorkerGlobalScope); | 65 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(WorkerGlobalScope); |
66 public: | 66 public: |
67 virtual ~WorkerGlobalScope(); | 67 virtual ~WorkerGlobalScope(); |
68 | 68 |
69 virtual bool isWorkerGlobalScope() const OVERRIDE FINAL { return true; } | 69 virtual bool isWorkerGlobalScope() const OVERRIDE FINAL { return true; } |
70 virtual bool isSharedWorkerGlobalScope() const OVERRIDE { return false; } | |
71 virtual bool isDedicatedWorkerGlobalScope() const OVERRIDE { return false; } | |
72 virtual bool isServiceWorkerGlobalScope() const OVERRIDE { return false; } | |
73 | 70 |
74 virtual ExecutionContext* executionContext() const OVERRIDE FINAL; | 71 virtual ExecutionContext* executionContext() const OVERRIDE FINAL; |
75 | 72 |
76 virtual void countFeature(UseCounter::Feature) const; | 73 virtual void countFeature(UseCounter::Feature) const; |
77 virtual void countDeprecation(UseCounter::Feature) const; | 74 virtual void countDeprecation(UseCounter::Feature) const; |
78 | 75 |
79 const KURL& url() const { return m_url; } | 76 const KURL& url() const { return m_url; } |
80 KURL completeURL(const String&) const; | 77 KURL completeURL(const String&) const; |
81 | 78 |
82 virtual String userAgent(const KURL&) const OVERRIDE FINAL; | 79 virtual String userAgent(const KURL&) const OVERRIDE FINAL; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 | 118 |
122 bool idleNotification(); | 119 bool idleNotification(); |
123 | 120 |
124 double timeOrigin() const { return m_timeOrigin; } | 121 double timeOrigin() const { return m_timeOrigin; } |
125 | 122 |
126 WorkerClients* clients() { return m_workerClients.get(); } | 123 WorkerClients* clients() { return m_workerClients.get(); } |
127 | 124 |
128 using SecurityContext::securityOrigin; | 125 using SecurityContext::securityOrigin; |
129 using SecurityContext::contentSecurityPolicy; | 126 using SecurityContext::contentSecurityPolicy; |
130 | 127 |
131 virtual void addMessage(PassRefPtrWillBeRawPtr<ConsoleMessage>) OVERRIDE FIN
AL; | 128 virtual void addConsoleMessage(PassRefPtrWillBeRawPtr<ConsoleMessage>) OVERR
IDE FINAL; |
132 ConsoleMessageStorage* messageStorage(); | 129 ConsoleMessageStorage* messageStorage(); |
133 | 130 |
134 virtual void trace(Visitor*) OVERRIDE; | 131 virtual void trace(Visitor*) OVERRIDE; |
135 | 132 |
136 protected: | 133 protected: |
137 WorkerGlobalScope(const KURL&, const String& userAgent, WorkerThread*, doubl
e timeOrigin, PassOwnPtrWillBeRawPtr<WorkerClients>); | 134 WorkerGlobalScope(const KURL&, const String& userAgent, WorkerThread*, doubl
e timeOrigin, PassOwnPtrWillBeRawPtr<WorkerClients>); |
138 void applyContentSecurityPolicyFromString(const String& contentSecurityPolic
y, ContentSecurityPolicyHeaderType); | 135 void applyContentSecurityPolicyFromString(const String& contentSecurityPolic
y, ContentSecurityPolicyHeaderType); |
139 | 136 |
140 virtual void logExceptionToConsole(const String& errorMessage, int scriptId,
const String& sourceURL, int lineNumber, int columnNumber, PassRefPtrWillBeRawP
tr<ScriptCallStack>) OVERRIDE; | 137 virtual void logExceptionToConsole(const String& errorMessage, int scriptId,
const String& sourceURL, int lineNumber, int columnNumber, PassRefPtrWillBeRawP
tr<ScriptCallStack>) OVERRIDE; |
141 void addMessageToWorkerConsole(PassRefPtrWillBeRawPtr<ConsoleMessage>); | 138 void addMessageToWorkerConsole(PassRefPtrWillBeRawPtr<ConsoleMessage>); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 double m_timeOrigin; | 171 double m_timeOrigin; |
175 | 172 |
176 OwnPtrWillBeMember<ConsoleMessageStorage> m_messageStorage; | 173 OwnPtrWillBeMember<ConsoleMessageStorage> m_messageStorage; |
177 }; | 174 }; |
178 | 175 |
179 DEFINE_TYPE_CASTS(WorkerGlobalScope, ExecutionContext, context, context->isWorke
rGlobalScope(), context.isWorkerGlobalScope()); | 176 DEFINE_TYPE_CASTS(WorkerGlobalScope, ExecutionContext, context, context->isWorke
rGlobalScope(), context.isWorkerGlobalScope()); |
180 | 177 |
181 } // namespace blink | 178 } // namespace blink |
182 | 179 |
183 #endif // WorkerGlobalScope_h | 180 #endif // WorkerGlobalScope_h |
OLD | NEW |