Chromium Code Reviews| 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 15 matching lines...) Expand all Loading... | |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef ServiceWorkerGlobalScopeProxy_h | 31 #ifndef ServiceWorkerGlobalScopeProxy_h |
| 32 #define ServiceWorkerGlobalScopeProxy_h | 32 #define ServiceWorkerGlobalScopeProxy_h |
| 33 | 33 |
| 34 #include "core/workers/WorkerReportingProxy.h" | 34 #include "core/workers/WorkerReportingProxy.h" |
| 35 #include "platform/heap/Handle.h" | 35 #include "platform/heap/Handle.h" |
| 36 #include "platform/weborigin/KURL.h" | |
| 36 #include "public/platform/WebString.h" | 37 #include "public/platform/WebString.h" |
| 37 #include "public/web/WebServiceWorkerContextProxy.h" | 38 #include "public/web/WebServiceWorkerContextProxy.h" |
| 38 #include "wtf/Forward.h" | 39 #include "wtf/Forward.h" |
| 39 #include "wtf/OwnPtr.h" | 40 #include "wtf/OwnPtr.h" |
| 40 | 41 |
| 41 namespace blink { | 42 namespace blink { |
| 42 | 43 |
| 43 class ConsoleMessage; | 44 class ConsoleMessage; |
| 44 class Document; | 45 class Document; |
| 45 class ServiceWorkerGlobalScope; | 46 class ServiceWorkerGlobalScope; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 80 void dispatchPushEvent(int, const WebString& data) override; | 81 void dispatchPushEvent(int, const WebString& data) override; |
| 81 void dispatchServicePortConnectEvent(WebServicePortConnectEventCallbacks*, c onst WebURL& targetURL, const WebString& origin, WebServicePortID) override; | 82 void dispatchServicePortConnectEvent(WebServicePortConnectEventCallbacks*, c onst WebURL& targetURL, const WebString& origin, WebServicePortID) override; |
| 82 void dispatchSyncEvent(int, const WebSyncRegistration&) override; | 83 void dispatchSyncEvent(int, const WebSyncRegistration&) override; |
| 83 | 84 |
| 84 // WorkerReportingProxy overrides: | 85 // WorkerReportingProxy overrides: |
| 85 void reportException(const String& errorMessage, int lineNumber, int columnN umber, const String& sourceURL, int exceptionId) override; | 86 void reportException(const String& errorMessage, int lineNumber, int columnN umber, const String& sourceURL, int exceptionId) override; |
| 86 void reportConsoleMessage(PassRefPtrWillBeRawPtr<ConsoleMessage>) override; | 87 void reportConsoleMessage(PassRefPtrWillBeRawPtr<ConsoleMessage>) override; |
| 87 void postMessageToPageInspector(const String&) override; | 88 void postMessageToPageInspector(const String&) override; |
| 88 void postWorkerConsoleAgentEnabled() override { } | 89 void postWorkerConsoleAgentEnabled() override { } |
| 89 void didEvaluateWorkerScript(bool success) override; | 90 void didEvaluateWorkerScript(bool success) override; |
| 91 void didInitializeWorkerContext() override; | |
| 90 void workerGlobalScopeStarted(WorkerGlobalScope*) override; | 92 void workerGlobalScopeStarted(WorkerGlobalScope*) override; |
| 91 void workerGlobalScopeClosed() override; | 93 void workerGlobalScopeClosed() override; |
| 92 void willDestroyWorkerGlobalScope() override; | 94 void willDestroyWorkerGlobalScope() override; |
| 93 void workerThreadTerminated() override; | 95 void workerThreadTerminated() override; |
| 94 | 96 |
| 95 private: | 97 private: |
| 96 ServiceWorkerGlobalScopeProxy(WebEmbeddedWorkerImpl&, Document&, WebServiceW orkerContextClient&); | 98 ServiceWorkerGlobalScopeProxy(WebEmbeddedWorkerImpl&, Document&, WebServiceW orkerContextClient&); |
| 97 | 99 |
| 98 WebEmbeddedWorkerImpl& m_embeddedWorker; | 100 WebEmbeddedWorkerImpl& m_embeddedWorker; |
| 99 Document& m_document; | 101 Document& m_document; |
| 100 | 102 |
| 101 WebServiceWorkerContextClient& m_client; | 103 WebServiceWorkerContextClient& m_client; |
| 102 | 104 |
| 103 ServiceWorkerGlobalScope* m_workerGlobalScope; | 105 ServiceWorkerGlobalScope* m_workerGlobalScope; |
| 106 | |
| 107 KURL m_url; | |
|
kinuko (google)
2015/08/17 10:27:20
nit: I'd call this m_documentUrl and put it under
annekao
2015/08/17 19:47:41
Done.
| |
| 104 }; | 108 }; |
| 105 | 109 |
| 106 } // namespace blink | 110 } // namespace blink |
| 107 | 111 |
| 108 #endif // ServiceWorkerGlobalScopeProxy_h | 112 #endif // ServiceWorkerGlobalScopeProxy_h |
| OLD | NEW |