| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 DEFINE_ATTRIBUTE_EVENT_LISTENER(activate); | 83 DEFINE_ATTRIBUTE_EVENT_LISTENER(activate); |
| 84 DEFINE_ATTRIBUTE_EVENT_LISTENER(fetch); | 84 DEFINE_ATTRIBUTE_EVENT_LISTENER(fetch); |
| 85 DEFINE_ATTRIBUTE_EVENT_LISTENER(message); | 85 DEFINE_ATTRIBUTE_EVENT_LISTENER(message); |
| 86 DEFINE_ATTRIBUTE_EVENT_LISTENER(foreignfetch); | 86 DEFINE_ATTRIBUTE_EVENT_LISTENER(foreignfetch); |
| 87 | 87 |
| 88 DECLARE_VIRTUAL_TRACE(); | 88 DECLARE_VIRTUAL_TRACE(); |
| 89 | 89 |
| 90 protected: | 90 protected: |
| 91 // EventTarget | 91 // EventTarget |
| 92 DispatchEventResult dispatchEventInternal(Event*) override; | 92 DispatchEventResult dispatchEventInternal(Event*) override; |
| 93 bool addEventListenerInternal(const AtomicString& eventType, EventListener*,
const AddEventListenerOptions&) override; | 93 bool addEventListenerInternal(const AtomicString& eventType, EventListener*,
const AddEventListenerOptionsResolved&) override; |
| 94 | 94 |
| 95 private: | 95 private: |
| 96 ServiceWorkerGlobalScope(const KURL&, const String& userAgent, ServiceWorker
Thread*, double timeOrigin, std::unique_ptr<SecurityOrigin::PrivilegeData>, Work
erClients*); | 96 ServiceWorkerGlobalScope(const KURL&, const String& userAgent, ServiceWorker
Thread*, double timeOrigin, std::unique_ptr<SecurityOrigin::PrivilegeData>, Work
erClients*); |
| 97 void importScripts(const Vector<String>& urls, ExceptionState&) override; | 97 void importScripts(const Vector<String>& urls, ExceptionState&) override; |
| 98 CachedMetadataHandler* createWorkerScriptCachedMetadataHandler(const KURL& s
criptURL, const Vector<char>* metaData) override; | 98 CachedMetadataHandler* createWorkerScriptCachedMetadataHandler(const KURL& s
criptURL, const Vector<char>* metaData) override; |
| 99 void logExceptionToConsole(const String& errorMessage, std::unique_ptr<Sourc
eLocation>) override; | 99 void logExceptionToConsole(const String& errorMessage, std::unique_ptr<Sourc
eLocation>) override; |
| 100 void scriptLoaded(size_t scriptSize, size_t cachedMetadataSize) override; | 100 void scriptLoaded(size_t scriptSize, size_t cachedMetadataSize) override; |
| 101 | 101 |
| 102 Member<ServiceWorkerClients> m_clients; | 102 Member<ServiceWorkerClients> m_clients; |
| 103 Member<ServiceWorkerRegistration> m_registration; | 103 Member<ServiceWorkerRegistration> m_registration; |
| 104 bool m_didEvaluateScript; | 104 bool m_didEvaluateScript; |
| 105 bool m_hadErrorInTopLevelEventHandler; | 105 bool m_hadErrorInTopLevelEventHandler; |
| 106 unsigned m_eventNestingLevel; | 106 unsigned m_eventNestingLevel; |
| 107 size_t m_scriptCount; | 107 size_t m_scriptCount; |
| 108 size_t m_scriptTotalSize; | 108 size_t m_scriptTotalSize; |
| 109 size_t m_scriptCachedMetadataTotalSize; | 109 size_t m_scriptCachedMetadataTotalSize; |
| 110 }; | 110 }; |
| 111 | 111 |
| 112 DEFINE_TYPE_CASTS(ServiceWorkerGlobalScope, ExecutionContext, context, context->
isServiceWorkerGlobalScope(), context.isServiceWorkerGlobalScope()); | 112 DEFINE_TYPE_CASTS(ServiceWorkerGlobalScope, ExecutionContext, context, context->
isServiceWorkerGlobalScope(), context.isServiceWorkerGlobalScope()); |
| 113 | 113 |
| 114 } // namespace blink | 114 } // namespace blink |
| 115 | 115 |
| 116 #endif // ServiceWorkerGlobalScope_h | 116 #endif // ServiceWorkerGlobalScope_h |
| OLD | NEW |