| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 | 67 |
| 68 CacheStorage* caches(ExecutionContext*); | 68 CacheStorage* caches(ExecutionContext*); |
| 69 | 69 |
| 70 ScriptPromise fetch(ScriptState*, Request*); | 70 ScriptPromise fetch(ScriptState*, Request*); |
| 71 ScriptPromise fetch(ScriptState*, Request*, const Dictionary&); | 71 ScriptPromise fetch(ScriptState*, Request*, const Dictionary&); |
| 72 ScriptPromise fetch(ScriptState*, const String&); | 72 ScriptPromise fetch(ScriptState*, const String&); |
| 73 ScriptPromise fetch(ScriptState*, const String&, const Dictionary&); | 73 ScriptPromise fetch(ScriptState*, const String&, const Dictionary&); |
| 74 | 74 |
| 75 void close(ExceptionState&); | 75 void close(ExceptionState&); |
| 76 | 76 |
| 77 ScriptPromise skipWaiting(ScriptState*); |
| 78 |
| 77 // EventTarget | 79 // EventTarget |
| 78 virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<Even
tListener>, bool useCapture = false) override; | 80 virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<Even
tListener>, bool useCapture = false) override; |
| 79 virtual const AtomicString& interfaceName() const override; | 81 virtual const AtomicString& interfaceName() const override; |
| 80 virtual bool dispatchEvent(PassRefPtrWillBeRawPtr<Event>) override; | 82 virtual bool dispatchEvent(PassRefPtrWillBeRawPtr<Event>) override; |
| 81 | 83 |
| 82 void dispatchExtendableEvent(PassRefPtrWillBeRawPtr<Event>, WaitUntilObserve
r*); | 84 void dispatchExtendableEvent(PassRefPtrWillBeRawPtr<Event>, WaitUntilObserve
r*); |
| 83 | 85 |
| 84 DEFINE_ATTRIBUTE_EVENT_LISTENER(install); | 86 DEFINE_ATTRIBUTE_EVENT_LISTENER(install); |
| 85 DEFINE_ATTRIBUTE_EVENT_LISTENER(activate); | 87 DEFINE_ATTRIBUTE_EVENT_LISTENER(activate); |
| 86 DEFINE_ATTRIBUTE_EVENT_LISTENER(fetch); | 88 DEFINE_ATTRIBUTE_EVENT_LISTENER(fetch); |
| 87 DEFINE_ATTRIBUTE_EVENT_LISTENER(message); | 89 DEFINE_ATTRIBUTE_EVENT_LISTENER(message); |
| 88 DEFINE_ATTRIBUTE_EVENT_LISTENER(sync); | 90 DEFINE_ATTRIBUTE_EVENT_LISTENER(sync); |
| 89 | 91 |
| 90 virtual void trace(Visitor*) override; | 92 virtual void trace(Visitor*) override; |
| 91 | 93 |
| 92 private: | 94 private: |
| 95 class SkipWaitingCallback; |
| 96 |
| 93 ServiceWorkerGlobalScope(const KURL&, const String& userAgent, ServiceWorker
Thread*, double timeOrigin, const SecurityOrigin*, PassOwnPtrWillBeRawPtr<Worker
Clients>); | 97 ServiceWorkerGlobalScope(const KURL&, const String& userAgent, ServiceWorker
Thread*, double timeOrigin, const SecurityOrigin*, PassOwnPtrWillBeRawPtr<Worker
Clients>); |
| 94 virtual void importScripts(const Vector<String>& urls, ExceptionState&) over
ride; | 98 virtual void importScripts(const Vector<String>& urls, ExceptionState&) over
ride; |
| 95 virtual void logExceptionToConsole(const String& errorMessage, int scriptId,
const String& sourceURL, int lineNumber, int columnNumber, PassRefPtrWillBeRawP
tr<ScriptCallStack>) override; | 99 virtual void logExceptionToConsole(const String& errorMessage, int scriptId,
const String& sourceURL, int lineNumber, int columnNumber, PassRefPtrWillBeRawP
tr<ScriptCallStack>) override; |
| 96 | 100 |
| 97 PersistentWillBeMember<ServiceWorkerClients> m_clients; | 101 PersistentWillBeMember<ServiceWorkerClients> m_clients; |
| 98 OwnPtr<FetchManager> m_fetchManager; | 102 OwnPtr<FetchManager> m_fetchManager; |
| 99 PersistentWillBeMember<CacheStorage> m_caches; | 103 PersistentWillBeMember<CacheStorage> m_caches; |
| 100 bool m_didEvaluateScript; | 104 bool m_didEvaluateScript; |
| 101 bool m_hadErrorInTopLevelEventHandler; | 105 bool m_hadErrorInTopLevelEventHandler; |
| 102 unsigned m_eventNestingLevel; | 106 unsigned m_eventNestingLevel; |
| 103 }; | 107 }; |
| 104 | 108 |
| 105 } // namespace blink | 109 } // namespace blink |
| 106 | 110 |
| 107 #endif // ServiceWorkerGlobalScope_h | 111 #endif // ServiceWorkerGlobalScope_h |
| OLD | NEW |