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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 const ServiceWorkerVersionAttributes& attrs); | 213 const ServiceWorkerVersionAttributes& attrs); |
214 | 214 |
215 // mojom::ServiceWorkerEventDispatcher | 215 // mojom::ServiceWorkerEventDispatcher |
216 void DispatchExtendableMessageEvent( | 216 void DispatchExtendableMessageEvent( |
217 mojom::ExtendableMessageEventPtr event, | 217 mojom::ExtendableMessageEventPtr event, |
218 const DispatchExtendableMessageEventCallback& callback) override; | 218 const DispatchExtendableMessageEventCallback& callback) override; |
219 void DispatchFetchEvent(int fetch_event_id, | 219 void DispatchFetchEvent(int fetch_event_id, |
220 const ServiceWorkerFetchRequest& request, | 220 const ServiceWorkerFetchRequest& request, |
221 mojom::FetchEventPreloadHandlePtr preload_handle, | 221 mojom::FetchEventPreloadHandlePtr preload_handle, |
222 const DispatchFetchEventCallback& callback) override; | 222 const DispatchFetchEventCallback& callback) override; |
| 223 void DispatchPushEvent(const PushEventPayload& payload, |
| 224 const DispatchPushEventCallback& callback) override; |
223 void DispatchSyncEvent( | 225 void DispatchSyncEvent( |
224 const std::string& tag, | 226 const std::string& tag, |
225 blink::mojom::BackgroundSyncEventLastChance last_chance, | 227 blink::mojom::BackgroundSyncEventLastChance last_chance, |
226 const DispatchSyncEventCallback& callback) override; | 228 const DispatchSyncEventCallback& callback) override; |
227 | 229 |
228 void OnActivateEvent(int request_id); | 230 void OnActivateEvent(int request_id); |
229 void OnInstallEvent(int request_id); | 231 void OnInstallEvent(int request_id); |
230 void OnNotificationClickEvent( | 232 void OnNotificationClickEvent( |
231 int request_id, | 233 int request_id, |
232 const std::string& notification_id, | 234 const std::string& notification_id, |
233 const PlatformNotificationData& notification_data, | 235 const PlatformNotificationData& notification_data, |
234 int action_index, | 236 int action_index, |
235 const base::NullableString16& reply); | 237 const base::NullableString16& reply); |
236 void OnPushEvent(int request_id, const PushEventPayload& payload); | |
237 void OnNotificationCloseEvent( | 238 void OnNotificationCloseEvent( |
238 int request_id, | 239 int request_id, |
239 const std::string& notification_id, | 240 const std::string& notification_id, |
240 const PlatformNotificationData& notification_data); | 241 const PlatformNotificationData& notification_data); |
241 | 242 |
242 void OnDidGetClient(int request_id, const ServiceWorkerClientInfo& client); | 243 void OnDidGetClient(int request_id, const ServiceWorkerClientInfo& client); |
243 void OnDidGetClients( | 244 void OnDidGetClients( |
244 int request_id, const std::vector<ServiceWorkerClientInfo>& clients); | 245 int request_id, const std::vector<ServiceWorkerClientInfo>& clients); |
245 void OnOpenWindowResponse(int request_id, | 246 void OnOpenWindowResponse(int request_id, |
246 const ServiceWorkerClientInfo& client); | 247 const ServiceWorkerClientInfo& client); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 // Initialized on the worker thread in workerContextStarted and | 291 // Initialized on the worker thread in workerContextStarted and |
291 // destructed on the worker thread in willDestroyWorkerContext. | 292 // destructed on the worker thread in willDestroyWorkerContext. |
292 std::unique_ptr<WorkerContextData> context_; | 293 std::unique_ptr<WorkerContextData> context_; |
293 | 294 |
294 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextClient); | 295 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextClient); |
295 }; | 296 }; |
296 | 297 |
297 } // namespace content | 298 } // namespace content |
298 | 299 |
299 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ | 300 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ |
OLD | NEW |