| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 | 128 |
| 132 bool idleNotification(); | 129 bool idleNotification(); |
| 133 | 130 |
| 134 double timeOrigin() const { return m_timeOrigin; } | 131 double timeOrigin() const { return m_timeOrigin; } |
| 135 | 132 |
| 136 WorkerClients* clients() { return m_workerClients.get(); } | 133 WorkerClients* clients() { return m_workerClients.get(); } |
| 137 | 134 |
| 138 using SecurityContext::securityOrigin; | 135 using SecurityContext::securityOrigin; |
| 139 using SecurityContext::contentSecurityPolicy; | 136 using SecurityContext::contentSecurityPolicy; |
| 140 | 137 |
| 141 virtual void addMessage(PassRefPtrWillBeRawPtr<ConsoleMessage>) OVERRIDE FIN
AL; | 138 virtual void addConsoleMessage(PassRefPtrWillBeRawPtr<ConsoleMessage>) OVERR
IDE FINAL; |
| 142 ConsoleMessageStorage* messageStorage(); | 139 ConsoleMessageStorage* messageStorage(); |
| 143 | 140 |
| 144 virtual void trace(Visitor*) OVERRIDE; | 141 virtual void trace(Visitor*) OVERRIDE; |
| 145 | 142 |
| 146 protected: | 143 protected: |
| 147 WorkerGlobalScope(const KURL&, const String& userAgent, WorkerThread*, doubl
e timeOrigin, PassOwnPtrWillBeRawPtr<WorkerClients>); | 144 WorkerGlobalScope(const KURL&, const String& userAgent, WorkerThread*, doubl
e timeOrigin, PassOwnPtrWillBeRawPtr<WorkerClients>); |
| 148 void applyContentSecurityPolicyFromString(const String& contentSecurityPolic
y, ContentSecurityPolicyHeaderType); | 145 void applyContentSecurityPolicyFromString(const String& contentSecurityPolic
y, ContentSecurityPolicyHeaderType); |
| 149 | 146 |
| 150 virtual void logExceptionToConsole(const String& errorMessage, int scriptId,
const String& sourceURL, int lineNumber, int columnNumber, PassRefPtrWillBeRawP
tr<ScriptCallStack>) OVERRIDE; | 147 virtual void logExceptionToConsole(const String& errorMessage, int scriptId,
const String& sourceURL, int lineNumber, int columnNumber, PassRefPtrWillBeRawP
tr<ScriptCallStack>) OVERRIDE; |
| 151 void addMessageToWorkerConsole(PassRefPtrWillBeRawPtr<ConsoleMessage>); | 148 void addMessageToWorkerConsole(PassRefPtrWillBeRawPtr<ConsoleMessage>); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 TerminationObserver* m_terminationObserver; | 182 TerminationObserver* m_terminationObserver; |
| 186 | 183 |
| 187 OwnPtrWillBeMember<ConsoleMessageStorage> m_messageStorage; | 184 OwnPtrWillBeMember<ConsoleMessageStorage> m_messageStorage; |
| 188 }; | 185 }; |
| 189 | 186 |
| 190 DEFINE_TYPE_CASTS(WorkerGlobalScope, ExecutionContext, context, context->isWorke
rGlobalScope(), context.isWorkerGlobalScope()); | 187 DEFINE_TYPE_CASTS(WorkerGlobalScope, ExecutionContext, context, context->isWorke
rGlobalScope(), context.isWorkerGlobalScope()); |
| 191 | 188 |
| 192 } // namespace blink | 189 } // namespace blink |
| 193 | 190 |
| 194 #endif // WorkerGlobalScope_h | 191 #endif // WorkerGlobalScope_h |
| OLD | NEW |