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