| 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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 virtual void OnBackgroundFetchedEvent( | 206 virtual void OnBackgroundFetchedEvent( |
| 207 const std::string& tag, | 207 const std::string& tag, |
| 208 const std::vector<BackgroundFetchSettledFetch>& fetches, | 208 const std::vector<BackgroundFetchSettledFetch>& fetches, |
| 209 const mojom::ServiceWorkerEventDispatcher:: | 209 const mojom::ServiceWorkerEventDispatcher:: |
| 210 DispatchBackgroundFetchedEventCallback& callback); | 210 DispatchBackgroundFetchedEventCallback& callback); |
| 211 virtual void OnExtendableMessageEvent( | 211 virtual void OnExtendableMessageEvent( |
| 212 mojom::ExtendableMessageEventPtr event, | 212 mojom::ExtendableMessageEventPtr event, |
| 213 const mojom::ServiceWorkerEventDispatcher:: | 213 const mojom::ServiceWorkerEventDispatcher:: |
| 214 DispatchExtendableMessageEventCallback& callback); | 214 DispatchExtendableMessageEventCallback& callback); |
| 215 virtual void OnInstallEvent(int embedded_worker_id, int request_id); | 215 virtual void OnInstallEvent(int embedded_worker_id, int request_id); |
| 216 virtual void OnFetchEvent(int embedded_worker_id, | 216 virtual void OnFetchEvent( |
| 217 int fetch_event_id, | 217 int embedded_worker_id, |
| 218 const ServiceWorkerFetchRequest& request, | 218 int fetch_event_id, |
| 219 mojom::FetchEventPreloadHandlePtr preload_handle, | 219 const ServiceWorkerFetchRequest& request, |
| 220 const FetchCallback& callback); | 220 mojom::FetchEventPreloadHandlePtr preload_handle, |
| 221 mojom::ServiceWorkerFetchResponseCallbackPtr response_callback, |
| 222 const FetchCallback& finish_callback); |
| 221 virtual void OnNotificationClickEvent( | 223 virtual void OnNotificationClickEvent( |
| 222 const std::string& notification_id, | 224 const std::string& notification_id, |
| 223 const PlatformNotificationData& notification_data, | 225 const PlatformNotificationData& notification_data, |
| 224 int action_index, | 226 int action_index, |
| 225 const base::Optional<base::string16>& reply, | 227 const base::Optional<base::string16>& reply, |
| 226 const mojom::ServiceWorkerEventDispatcher:: | 228 const mojom::ServiceWorkerEventDispatcher:: |
| 227 DispatchNotificationClickEventCallback& callback); | 229 DispatchNotificationClickEventCallback& callback); |
| 228 virtual void OnNotificationCloseEvent( | 230 virtual void OnNotificationCloseEvent( |
| 229 const std::string& notification_id, | 231 const std::string& notification_id, |
| 230 const PlatformNotificationData& notification_data, | 232 const PlatformNotificationData& notification_data, |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 void OnBackgroundFetchedEventStub( | 289 void OnBackgroundFetchedEventStub( |
| 288 const std::string& tag, | 290 const std::string& tag, |
| 289 const std::vector<BackgroundFetchSettledFetch>& fetches, | 291 const std::vector<BackgroundFetchSettledFetch>& fetches, |
| 290 const mojom::ServiceWorkerEventDispatcher:: | 292 const mojom::ServiceWorkerEventDispatcher:: |
| 291 DispatchBackgroundFetchedEventCallback& callback); | 293 DispatchBackgroundFetchedEventCallback& callback); |
| 292 void OnExtendableMessageEventStub( | 294 void OnExtendableMessageEventStub( |
| 293 mojom::ExtendableMessageEventPtr event, | 295 mojom::ExtendableMessageEventPtr event, |
| 294 const mojom::ServiceWorkerEventDispatcher:: | 296 const mojom::ServiceWorkerEventDispatcher:: |
| 295 DispatchExtendableMessageEventCallback& callback); | 297 DispatchExtendableMessageEventCallback& callback); |
| 296 void OnInstallEventStub(int request_id); | 298 void OnInstallEventStub(int request_id); |
| 297 void OnFetchEventStub(int thread_id, | 299 void OnFetchEventStub( |
| 298 int fetch_event_id, | 300 int thread_id, |
| 299 const ServiceWorkerFetchRequest& request, | 301 int fetch_event_id, |
| 300 mojom::FetchEventPreloadHandlePtr preload_handle, | 302 const ServiceWorkerFetchRequest& request, |
| 301 const FetchCallback& callback); | 303 mojom::FetchEventPreloadHandlePtr preload_handle, |
| 304 mojom::ServiceWorkerFetchResponseCallbackPtr response_callback, |
| 305 const FetchCallback& finish_callback); |
| 302 void OnNotificationClickEventStub( | 306 void OnNotificationClickEventStub( |
| 303 const std::string& notification_id, | 307 const std::string& notification_id, |
| 304 const PlatformNotificationData& notification_data, | 308 const PlatformNotificationData& notification_data, |
| 305 int action_index, | 309 int action_index, |
| 306 const base::Optional<base::string16>& reply, | 310 const base::Optional<base::string16>& reply, |
| 307 const mojom::ServiceWorkerEventDispatcher:: | 311 const mojom::ServiceWorkerEventDispatcher:: |
| 308 DispatchNotificationClickEventCallback& callback); | 312 DispatchNotificationClickEventCallback& callback); |
| 309 void OnNotificationCloseEventStub( | 313 void OnNotificationCloseEventStub( |
| 310 const std::string& notification_id, | 314 const std::string& notification_id, |
| 311 const PlatformNotificationData& notification_data, | 315 const PlatformNotificationData& notification_data, |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 std::unique_ptr<MockType> mock = | 371 std::unique_ptr<MockType> mock = |
| 368 base::MakeUnique<MockType>(std::forward<Args>(args)...); | 372 base::MakeUnique<MockType>(std::forward<Args>(args)...); |
| 369 MockType* mock_rawptr = mock.get(); | 373 MockType* mock_rawptr = mock.get(); |
| 370 RegisterMockInstanceClient(std::move(mock)); | 374 RegisterMockInstanceClient(std::move(mock)); |
| 371 return mock_rawptr; | 375 return mock_rawptr; |
| 372 } | 376 } |
| 373 | 377 |
| 374 } // namespace content | 378 } // namespace content |
| 375 | 379 |
| 376 #endif // CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_TEST_HELPER_H_ | 380 #endif // CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_TEST_HELPER_H_ |
| OLD | NEW |