| 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_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_TEST_HELPER_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_TEST_HELPER_H_ |
| 6 #define CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_TEST_HELPER_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_TEST_HELPER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 virtual void OnBackgroundFetchedEvent( | 203 virtual void OnBackgroundFetchedEvent( |
| 204 const std::string& tag, | 204 const std::string& tag, |
| 205 const std::vector<BackgroundFetchSettledFetch>& fetches, | 205 const std::vector<BackgroundFetchSettledFetch>& fetches, |
| 206 const mojom::ServiceWorkerEventDispatcher:: | 206 const mojom::ServiceWorkerEventDispatcher:: |
| 207 DispatchBackgroundFetchedEventCallback& callback); | 207 DispatchBackgroundFetchedEventCallback& callback); |
| 208 virtual void OnExtendableMessageEvent( | 208 virtual void OnExtendableMessageEvent( |
| 209 mojom::ExtendableMessageEventPtr event, | 209 mojom::ExtendableMessageEventPtr event, |
| 210 const mojom::ServiceWorkerEventDispatcher:: | 210 const mojom::ServiceWorkerEventDispatcher:: |
| 211 DispatchExtendableMessageEventCallback& callback); | 211 DispatchExtendableMessageEventCallback& callback); |
| 212 virtual void OnInstallEvent(int embedded_worker_id, int request_id); | 212 virtual void OnInstallEvent(int embedded_worker_id, int request_id); |
| 213 virtual void OnFetchEvent(int embedded_worker_id, | 213 virtual void OnFetchEvent( |
| 214 int fetch_event_id, | 214 int embedded_worker_id, |
| 215 const ServiceWorkerFetchRequest& request, | 215 int fetch_event_id, |
| 216 mojom::FetchEventPreloadHandlePtr preload_handle, | 216 const ServiceWorkerFetchRequest& request, |
| 217 const FetchCallback& callback); | 217 mojom::FetchEventPreloadHandlePtr preload_handle, |
| 218 mojom::ServiceWorkerFetchResponseCallbackPtr response_callback, |
| 219 const FetchCallback& finish_callback); |
| 218 virtual void OnNotificationClickEvent( | 220 virtual void OnNotificationClickEvent( |
| 219 const std::string& notification_id, | 221 const std::string& notification_id, |
| 220 const PlatformNotificationData& notification_data, | 222 const PlatformNotificationData& notification_data, |
| 221 int action_index, | 223 int action_index, |
| 222 const base::Optional<base::string16>& reply, | 224 const base::Optional<base::string16>& reply, |
| 223 const mojom::ServiceWorkerEventDispatcher:: | 225 const mojom::ServiceWorkerEventDispatcher:: |
| 224 DispatchNotificationClickEventCallback& callback); | 226 DispatchNotificationClickEventCallback& callback); |
| 225 virtual void OnNotificationCloseEvent( | 227 virtual void OnNotificationCloseEvent( |
| 226 const std::string& notification_id, | 228 const std::string& notification_id, |
| 227 const PlatformNotificationData& notification_data, | 229 const PlatformNotificationData& notification_data, |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 void OnBackgroundFetchedEventStub( | 283 void OnBackgroundFetchedEventStub( |
| 282 const std::string& tag, | 284 const std::string& tag, |
| 283 const std::vector<BackgroundFetchSettledFetch>& fetches, | 285 const std::vector<BackgroundFetchSettledFetch>& fetches, |
| 284 const mojom::ServiceWorkerEventDispatcher:: | 286 const mojom::ServiceWorkerEventDispatcher:: |
| 285 DispatchBackgroundFetchedEventCallback& callback); | 287 DispatchBackgroundFetchedEventCallback& callback); |
| 286 void OnExtendableMessageEventStub( | 288 void OnExtendableMessageEventStub( |
| 287 mojom::ExtendableMessageEventPtr event, | 289 mojom::ExtendableMessageEventPtr event, |
| 288 const mojom::ServiceWorkerEventDispatcher:: | 290 const mojom::ServiceWorkerEventDispatcher:: |
| 289 DispatchExtendableMessageEventCallback& callback); | 291 DispatchExtendableMessageEventCallback& callback); |
| 290 void OnInstallEventStub(int request_id); | 292 void OnInstallEventStub(int request_id); |
| 291 void OnFetchEventStub(int thread_id, | 293 void OnFetchEventStub( |
| 292 int fetch_event_id, | 294 int thread_id, |
| 293 const ServiceWorkerFetchRequest& request, | 295 int fetch_event_id, |
| 294 mojom::FetchEventPreloadHandlePtr preload_handle, | 296 const ServiceWorkerFetchRequest& request, |
| 295 const FetchCallback& callback); | 297 mojom::FetchEventPreloadHandlePtr preload_handle, |
| 298 mojom::ServiceWorkerFetchResponseCallbackPtr response_callback, |
| 299 const FetchCallback& finish_callback); |
| 296 void OnNotificationClickEventStub( | 300 void OnNotificationClickEventStub( |
| 297 const std::string& notification_id, | 301 const std::string& notification_id, |
| 298 const PlatformNotificationData& notification_data, | 302 const PlatformNotificationData& notification_data, |
| 299 int action_index, | 303 int action_index, |
| 300 const base::Optional<base::string16>& reply, | 304 const base::Optional<base::string16>& reply, |
| 301 const mojom::ServiceWorkerEventDispatcher:: | 305 const mojom::ServiceWorkerEventDispatcher:: |
| 302 DispatchNotificationClickEventCallback& callback); | 306 DispatchNotificationClickEventCallback& callback); |
| 303 void OnNotificationCloseEventStub( | 307 void OnNotificationCloseEventStub( |
| 304 const std::string& notification_id, | 308 const std::string& notification_id, |
| 305 const PlatformNotificationData& notification_data, | 309 const PlatformNotificationData& notification_data, |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 std::unique_ptr<MockType> mock = | 359 std::unique_ptr<MockType> mock = |
| 356 base::MakeUnique<MockType>(std::forward<Args>(args)...); | 360 base::MakeUnique<MockType>(std::forward<Args>(args)...); |
| 357 MockType* mock_rawptr = mock.get(); | 361 MockType* mock_rawptr = mock.get(); |
| 358 RegisterMockInstanceClient(std::move(mock)); | 362 RegisterMockInstanceClient(std::move(mock)); |
| 359 return mock_rawptr; | 363 return mock_rawptr; |
| 360 } | 364 } |
| 361 | 365 |
| 362 } // namespace content | 366 } // namespace content |
| 363 | 367 |
| 364 #endif // CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_TEST_HELPER_H_ | 368 #endif // CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_TEST_HELPER_H_ |
| OLD | NEW |