| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 | 88 |
| 89 protected: | 89 protected: |
| 90 // EventTarget | 90 // EventTarget |
| 91 DispatchEventResult dispatchEventInternal(Event*) override; | 91 DispatchEventResult dispatchEventInternal(Event*) override; |
| 92 bool addEventListenerInternal(const AtomicString& eventType, EventListener*,
const AddEventListenerOptions&) override; | 92 bool addEventListenerInternal(const AtomicString& eventType, EventListener*,
const AddEventListenerOptions&) override; |
| 93 | 93 |
| 94 private: | 94 private: |
| 95 ServiceWorkerGlobalScope(const KURL&, const String& userAgent, ServiceWorker
Thread*, double timeOrigin, PassOwnPtr<SecurityOrigin::PrivilegeData>, WorkerCli
ents*); | 95 ServiceWorkerGlobalScope(const KURL&, const String& userAgent, ServiceWorker
Thread*, double timeOrigin, PassOwnPtr<SecurityOrigin::PrivilegeData>, WorkerCli
ents*); |
| 96 void importScripts(const Vector<String>& urls, ExceptionState&) override; | 96 void importScripts(const Vector<String>& urls, ExceptionState&) override; |
| 97 CachedMetadataHandler* createWorkerScriptCachedMetadataHandler(const KURL& s
criptURL, const Vector<char>* metaData) override; | 97 CachedMetadataHandler* createWorkerScriptCachedMetadataHandler(const KURL& s
criptURL, const Vector<char>* metaData) override; |
| 98 void logExceptionToConsole(const String& errorMessage, int scriptId, const S
tring& sourceURL, int lineNumber, int columnNumber, PassRefPtr<ScriptCallStack>)
override; | 98 void logExceptionToConsole(const String& errorMessage, PassOwnPtr<SourceLoca
tion>) override; |
| 99 void scriptLoaded(size_t scriptSize, size_t cachedMetadataSize) override; | 99 void scriptLoaded(size_t scriptSize, size_t cachedMetadataSize) override; |
| 100 | 100 |
| 101 Member<ServiceWorkerClients> m_clients; | 101 Member<ServiceWorkerClients> m_clients; |
| 102 Member<ServiceWorkerRegistration> m_registration; | 102 Member<ServiceWorkerRegistration> m_registration; |
| 103 bool m_didEvaluateScript; | 103 bool m_didEvaluateScript; |
| 104 bool m_hadErrorInTopLevelEventHandler; | 104 bool m_hadErrorInTopLevelEventHandler; |
| 105 unsigned m_eventNestingLevel; | 105 unsigned m_eventNestingLevel; |
| 106 size_t m_scriptCount; | 106 size_t m_scriptCount; |
| 107 size_t m_scriptTotalSize; | 107 size_t m_scriptTotalSize; |
| 108 size_t m_scriptCachedMetadataTotalSize; | 108 size_t m_scriptCachedMetadataTotalSize; |
| 109 }; | 109 }; |
| 110 | 110 |
| 111 DEFINE_TYPE_CASTS(ServiceWorkerGlobalScope, ExecutionContext, context, context->
isServiceWorkerGlobalScope(), context.isServiceWorkerGlobalScope()); | 111 DEFINE_TYPE_CASTS(ServiceWorkerGlobalScope, ExecutionContext, context, context->
isServiceWorkerGlobalScope(), context.isServiceWorkerGlobalScope()); |
| 112 | 112 |
| 113 } // namespace blink | 113 } // namespace blink |
| 114 | 114 |
| 115 #endif // ServiceWorkerGlobalScope_h | 115 #endif // ServiceWorkerGlobalScope_h |
| OLD | NEW |