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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 // | 59 // |
60 // An instance of this class is supposed to outlive until | 60 // An instance of this class is supposed to outlive until |
61 // workerThreadTerminated() is called by its corresponding | 61 // workerThreadTerminated() is called by its corresponding |
62 // WorkerGlobalScope. | 62 // WorkerGlobalScope. |
63 class ServiceWorkerGlobalScopeProxy final | 63 class ServiceWorkerGlobalScopeProxy final |
64 : public GarbageCollectedFinalized<ServiceWorkerGlobalScopeProxy> | 64 : public GarbageCollectedFinalized<ServiceWorkerGlobalScopeProxy> |
65 , public WebServiceWorkerContextProxy | 65 , public WebServiceWorkerContextProxy |
66 , public WorkerReportingProxy { | 66 , public WorkerReportingProxy { |
67 WTF_MAKE_NONCOPYABLE(ServiceWorkerGlobalScopeProxy); | 67 WTF_MAKE_NONCOPYABLE(ServiceWorkerGlobalScopeProxy); |
68 public: | 68 public: |
69 static RawPtr<ServiceWorkerGlobalScopeProxy> create(WebEmbeddedWorkerImpl&,
Document&, WebServiceWorkerContextClient&); | 69 static ServiceWorkerGlobalScopeProxy* create(WebEmbeddedWorkerImpl&, Documen
t&, WebServiceWorkerContextClient&); |
70 ~ServiceWorkerGlobalScopeProxy() override; | 70 ~ServiceWorkerGlobalScopeProxy() override; |
71 | 71 |
72 // WebServiceWorkerContextProxy overrides: | 72 // WebServiceWorkerContextProxy overrides: |
73 void setRegistration(std::unique_ptr<WebServiceWorkerRegistration::Handle>)
override; | 73 void setRegistration(std::unique_ptr<WebServiceWorkerRegistration::Handle>)
override; |
74 void dispatchActivateEvent(int) override; | 74 void dispatchActivateEvent(int) override; |
75 void dispatchExtendableMessageEvent(int eventID, const WebString& message, c
onst WebSecurityOrigin& sourceOrigin, const WebMessagePortChannelArray&, const W
ebServiceWorkerClientInfo&) override; | 75 void dispatchExtendableMessageEvent(int eventID, const WebString& message, c
onst WebSecurityOrigin& sourceOrigin, const WebMessagePortChannelArray&, const W
ebServiceWorkerClientInfo&) override; |
76 void dispatchExtendableMessageEvent(int eventID, const WebString& message, c
onst WebSecurityOrigin& sourceOrigin, const WebMessagePortChannelArray&, std::un
ique_ptr<WebServiceWorker::Handle>) override; | 76 void dispatchExtendableMessageEvent(int eventID, const WebString& message, c
onst WebSecurityOrigin& sourceOrigin, const WebMessagePortChannelArray&, std::un
ique_ptr<WebServiceWorker::Handle>) override; |
77 void dispatchFetchEvent(int, const WebServiceWorkerRequest&) override; | 77 void dispatchFetchEvent(int, const WebServiceWorkerRequest&) override; |
78 void dispatchForeignFetchEvent(int, const WebServiceWorkerRequest&) override
; | 78 void dispatchForeignFetchEvent(int, const WebServiceWorkerRequest&) override
; |
79 void dispatchGeofencingEvent(int, WebGeofencingEventType, const WebString& r
egionID, const WebCircularGeofencingRegion&) override; | 79 void dispatchGeofencingEvent(int, WebGeofencingEventType, const WebString& r
egionID, const WebCircularGeofencingRegion&) override; |
80 void dispatchInstallEvent(int) override; | 80 void dispatchInstallEvent(int) override; |
81 void dispatchMessageEvent(const WebString& message, const WebMessagePortChan
nelArray&) override; | 81 void dispatchMessageEvent(const WebString& message, const WebMessagePortChan
nelArray&) override; |
82 void dispatchNotificationClickEvent(int, int64_t notificationID, const WebNo
tificationData&, int actionIndex) override; | 82 void dispatchNotificationClickEvent(int, int64_t notificationID, const WebNo
tificationData&, int actionIndex) override; |
83 void dispatchNotificationCloseEvent(int, int64_t notificationID, const WebNo
tificationData&) override; | 83 void dispatchNotificationCloseEvent(int, int64_t notificationID, const WebNo
tificationData&) override; |
84 void dispatchPushEvent(int, const WebString& data) override; | 84 void dispatchPushEvent(int, const WebString& data) override; |
85 void dispatchSyncEvent(int, const WebString& tag, LastChanceOption) override
; | 85 void dispatchSyncEvent(int, const WebString& tag, LastChanceOption) override
; |
86 | 86 |
87 // WorkerReportingProxy overrides: | 87 // WorkerReportingProxy overrides: |
88 void reportException(const String& errorMessage, int lineNumber, int columnN
umber, const String& sourceURL, int exceptionId) override; | 88 void reportException(const String& errorMessage, int lineNumber, int columnN
umber, const String& sourceURL, int exceptionId) override; |
89 void reportConsoleMessage(RawPtr<ConsoleMessage>) override; | 89 void reportConsoleMessage(ConsoleMessage*) override; |
90 void postMessageToPageInspector(const String&) override; | 90 void postMessageToPageInspector(const String&) override; |
91 void postWorkerConsoleAgentEnabled() override { } | 91 void postWorkerConsoleAgentEnabled() override { } |
92 void didEvaluateWorkerScript(bool success) override; | 92 void didEvaluateWorkerScript(bool success) override; |
93 void didInitializeWorkerContext() override; | 93 void didInitializeWorkerContext() override; |
94 void workerGlobalScopeStarted(WorkerGlobalScope*) override; | 94 void workerGlobalScopeStarted(WorkerGlobalScope*) override; |
95 void workerGlobalScopeClosed() override; | 95 void workerGlobalScopeClosed() override; |
96 void willDestroyWorkerGlobalScope() override; | 96 void willDestroyWorkerGlobalScope() override; |
97 void workerThreadTerminated() override; | 97 void workerThreadTerminated() override; |
98 | 98 |
99 DECLARE_TRACE(); | 99 DECLARE_TRACE(); |
(...skipping 18 matching lines...) Expand all Loading... |
118 Member<Document> m_document; | 118 Member<Document> m_document; |
119 | 119 |
120 WebServiceWorkerContextClient* m_client; | 120 WebServiceWorkerContextClient* m_client; |
121 | 121 |
122 Member<ServiceWorkerGlobalScope> m_workerGlobalScope; | 122 Member<ServiceWorkerGlobalScope> m_workerGlobalScope; |
123 }; | 123 }; |
124 | 124 |
125 } // namespace blink | 125 } // namespace blink |
126 | 126 |
127 #endif // ServiceWorkerGlobalScopeProxy_h | 127 #endif // ServiceWorkerGlobalScopeProxy_h |
OLD | NEW |