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 DispatchInstallEvent( |
| 216 const DispatchInstallEventCallback& callback) override; |
215 void DispatchActivateEvent( | 217 void DispatchActivateEvent( |
216 const DispatchActivateEventCallback& callback) override; | 218 const DispatchActivateEventCallback& callback) override; |
217 void DispatchExtendableMessageEvent( | 219 void DispatchExtendableMessageEvent( |
218 mojom::ExtendableMessageEventPtr event, | 220 mojom::ExtendableMessageEventPtr event, |
219 const DispatchExtendableMessageEventCallback& callback) override; | 221 const DispatchExtendableMessageEventCallback& callback) override; |
220 void DispatchFetchEvent(int fetch_event_id, | 222 void DispatchFetchEvent(int fetch_event_id, |
221 const ServiceWorkerFetchRequest& request, | 223 const ServiceWorkerFetchRequest& request, |
222 mojom::FetchEventPreloadHandlePtr preload_handle, | 224 mojom::FetchEventPreloadHandlePtr preload_handle, |
223 const DispatchFetchEventCallback& callback) override; | 225 const DispatchFetchEventCallback& callback) override; |
224 void DispatchNotificationClickEvent( | 226 void DispatchNotificationClickEvent( |
225 const std::string& notification_id, | 227 const std::string& notification_id, |
226 const PlatformNotificationData& notification_data, | 228 const PlatformNotificationData& notification_data, |
227 int action_index, | 229 int action_index, |
228 const base::Optional<base::string16>& reply, | 230 const base::Optional<base::string16>& reply, |
229 const DispatchNotificationClickEventCallback& callback) override; | 231 const DispatchNotificationClickEventCallback& callback) override; |
230 void DispatchNotificationCloseEvent( | 232 void DispatchNotificationCloseEvent( |
231 const std::string& notification_id, | 233 const std::string& notification_id, |
232 const PlatformNotificationData& notification_data, | 234 const PlatformNotificationData& notification_data, |
233 const DispatchNotificationCloseEventCallback& callback) override; | 235 const DispatchNotificationCloseEventCallback& callback) override; |
234 void DispatchPushEvent(const PushEventPayload& payload, | 236 void DispatchPushEvent(const PushEventPayload& payload, |
235 const DispatchPushEventCallback& callback) override; | 237 const DispatchPushEventCallback& callback) override; |
236 void DispatchSyncEvent( | 238 void DispatchSyncEvent( |
237 const std::string& tag, | 239 const std::string& tag, |
238 blink::mojom::BackgroundSyncEventLastChance last_chance, | 240 blink::mojom::BackgroundSyncEventLastChance last_chance, |
239 const DispatchSyncEventCallback& callback) override; | 241 const DispatchSyncEventCallback& callback) override; |
240 void DispatchPaymentRequestEvent( | 242 void DispatchPaymentRequestEvent( |
241 payments::mojom::PaymentAppRequestPtr app_request, | 243 payments::mojom::PaymentAppRequestPtr app_request, |
242 const DispatchPaymentRequestEventCallback& callback) override; | 244 const DispatchPaymentRequestEventCallback& callback) override; |
243 | 245 |
244 void OnInstallEvent(int request_id); | |
245 void OnNotificationClickEvent( | 246 void OnNotificationClickEvent( |
246 int request_id, | 247 int request_id, |
247 const std::string& notification_id, | 248 const std::string& notification_id, |
248 const PlatformNotificationData& notification_data, | 249 const PlatformNotificationData& notification_data, |
249 int action_index, | 250 int action_index, |
250 const base::NullableString16& reply); | 251 const base::NullableString16& reply); |
251 void OnNotificationCloseEvent( | 252 void OnNotificationCloseEvent( |
252 int request_id, | 253 int request_id, |
253 const std::string& notification_id, | 254 const std::string& notification_id, |
254 const PlatformNotificationData& notification_data); | 255 const PlatformNotificationData& notification_data); |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 // Initialized on the worker thread in workerContextStarted and | 312 // Initialized on the worker thread in workerContextStarted and |
312 // destructed on the worker thread in willDestroyWorkerContext. | 313 // destructed on the worker thread in willDestroyWorkerContext. |
313 std::unique_ptr<WorkerContextData> context_; | 314 std::unique_ptr<WorkerContextData> context_; |
314 | 315 |
315 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextClient); | 316 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextClient); |
316 }; | 317 }; |
317 | 318 |
318 } // namespace content | 319 } // namespace content |
319 | 320 |
320 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ | 321 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ |
OLD | NEW |