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