OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ | 5 #ifndef CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ |
6 #define CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ | 6 #define CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 // in the browser process. | 205 // in the browser process. |
206 int GetRoutingID() const { return embedded_worker_id_; } | 206 int GetRoutingID() const { return embedded_worker_id_; } |
207 | 207 |
208 void Send(IPC::Message* message); | 208 void Send(IPC::Message* message); |
209 void SendWorkerStarted(); | 209 void SendWorkerStarted(); |
210 void SetRegistrationInServiceWorkerGlobalScope( | 210 void SetRegistrationInServiceWorkerGlobalScope( |
211 const ServiceWorkerRegistrationObjectInfo& info, | 211 const ServiceWorkerRegistrationObjectInfo& info, |
212 const ServiceWorkerVersionAttributes& attrs); | 212 const ServiceWorkerVersionAttributes& attrs); |
213 | 213 |
214 // mojom::ServiceWorkerEventDispatcher | 214 // mojom::ServiceWorkerEventDispatcher |
| 215 void DispatchActivateEvent( |
| 216 const DispatchActivateEventCallback& callback) override; |
215 void DispatchExtendableMessageEvent( | 217 void DispatchExtendableMessageEvent( |
216 mojom::ExtendableMessageEventPtr event, | 218 mojom::ExtendableMessageEventPtr event, |
217 const DispatchExtendableMessageEventCallback& callback) override; | 219 const DispatchExtendableMessageEventCallback& callback) override; |
218 void DispatchFetchEvent(int fetch_event_id, | 220 void DispatchFetchEvent(int fetch_event_id, |
219 const ServiceWorkerFetchRequest& request, | 221 const ServiceWorkerFetchRequest& request, |
220 mojom::FetchEventPreloadHandlePtr preload_handle, | 222 mojom::FetchEventPreloadHandlePtr preload_handle, |
221 const DispatchFetchEventCallback& callback) override; | 223 const DispatchFetchEventCallback& callback) override; |
222 void DispatchNotificationClickEvent( | 224 void DispatchNotificationClickEvent( |
223 const std::string& notification_id, | 225 const std::string& notification_id, |
224 const PlatformNotificationData& notification_data, | 226 const PlatformNotificationData& notification_data, |
225 int action_index, | 227 int action_index, |
226 const base::Optional<base::string16>& reply, | 228 const base::Optional<base::string16>& reply, |
227 const DispatchNotificationClickEventCallback& callback) override; | 229 const DispatchNotificationClickEventCallback& callback) override; |
228 void DispatchNotificationCloseEvent( | 230 void DispatchNotificationCloseEvent( |
229 const std::string& notification_id, | 231 const std::string& notification_id, |
230 const PlatformNotificationData& notification_data, | 232 const PlatformNotificationData& notification_data, |
231 const DispatchNotificationCloseEventCallback& callback) override; | 233 const DispatchNotificationCloseEventCallback& callback) override; |
232 void DispatchPushEvent(const PushEventPayload& payload, | 234 void DispatchPushEvent(const PushEventPayload& payload, |
233 const DispatchPushEventCallback& callback) override; | 235 const DispatchPushEventCallback& callback) override; |
234 void DispatchSyncEvent( | 236 void DispatchSyncEvent( |
235 const std::string& tag, | 237 const std::string& tag, |
236 blink::mojom::BackgroundSyncEventLastChance last_chance, | 238 blink::mojom::BackgroundSyncEventLastChance last_chance, |
237 const DispatchSyncEventCallback& callback) override; | 239 const DispatchSyncEventCallback& callback) override; |
238 void DispatchPaymentRequestEvent( | 240 void DispatchPaymentRequestEvent( |
239 payments::mojom::PaymentAppRequestPtr app_request, | 241 payments::mojom::PaymentAppRequestPtr app_request, |
240 const DispatchPaymentRequestEventCallback& callback) override; | 242 const DispatchPaymentRequestEventCallback& callback) override; |
241 | 243 |
242 void OnActivateEvent(int request_id); | |
243 void OnInstallEvent(int request_id); | 244 void OnInstallEvent(int request_id); |
244 void OnNotificationClickEvent( | 245 void OnNotificationClickEvent( |
245 int request_id, | 246 int request_id, |
246 const std::string& notification_id, | 247 const std::string& notification_id, |
247 const PlatformNotificationData& notification_data, | 248 const PlatformNotificationData& notification_data, |
248 int action_index, | 249 int action_index, |
249 const base::NullableString16& reply); | 250 const base::NullableString16& reply); |
250 void OnNotificationCloseEvent( | 251 void OnNotificationCloseEvent( |
251 int request_id, | 252 int request_id, |
252 const std::string& notification_id, | 253 const std::string& notification_id, |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 // Initialized on the worker thread in workerContextStarted and | 311 // Initialized on the worker thread in workerContextStarted and |
311 // destructed on the worker thread in willDestroyWorkerContext. | 312 // destructed on the worker thread in willDestroyWorkerContext. |
312 std::unique_ptr<WorkerContextData> context_; | 313 std::unique_ptr<WorkerContextData> context_; |
313 | 314 |
314 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextClient); | 315 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextClient); |
315 }; | 316 }; |
316 | 317 |
317 } // namespace content | 318 } // namespace content |
318 | 319 |
319 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ | 320 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ |
OLD | NEW |