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 17 matching lines...) Expand all Loading... |
28 #include "url/gurl.h" | 28 #include "url/gurl.h" |
29 | 29 |
30 class GURL; | 30 class GURL; |
31 | 31 |
32 namespace service_manager { | 32 namespace service_manager { |
33 class InterfaceRegistry; | 33 class InterfaceRegistry; |
34 } | 34 } |
35 | 35 |
36 namespace content { | 36 namespace content { |
37 | 37 |
| 38 struct BackgroundFetchSettledFetch; |
38 class EmbeddedWorkerRegistry; | 39 class EmbeddedWorkerRegistry; |
39 class EmbeddedWorkerTestHelper; | 40 class EmbeddedWorkerTestHelper; |
40 class MockRenderProcessHost; | 41 class MockRenderProcessHost; |
41 class ServiceWorkerContextCore; | 42 class ServiceWorkerContextCore; |
42 class ServiceWorkerContextWrapper; | 43 class ServiceWorkerContextWrapper; |
43 class ServiceWorkerDispatcherHost; | 44 class ServiceWorkerDispatcherHost; |
44 class TestBrowserContext; | 45 class TestBrowserContext; |
45 struct EmbeddedWorkerStartParams; | 46 struct EmbeddedWorkerStartParams; |
46 struct PlatformNotificationData; | 47 struct PlatformNotificationData; |
47 struct PushEventPayload; | 48 struct PushEventPayload; |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 callback); | 192 callback); |
192 virtual void OnBackgroundFetchAbortEvent( | 193 virtual void OnBackgroundFetchAbortEvent( |
193 const std::string& tag, | 194 const std::string& tag, |
194 const mojom::ServiceWorkerEventDispatcher:: | 195 const mojom::ServiceWorkerEventDispatcher:: |
195 DispatchBackgroundFetchAbortEventCallback& callback); | 196 DispatchBackgroundFetchAbortEventCallback& callback); |
196 virtual void OnBackgroundFetchClickEvent( | 197 virtual void OnBackgroundFetchClickEvent( |
197 const std::string& tag, | 198 const std::string& tag, |
198 mojom::BackgroundFetchState state, | 199 mojom::BackgroundFetchState state, |
199 const mojom::ServiceWorkerEventDispatcher:: | 200 const mojom::ServiceWorkerEventDispatcher:: |
200 DispatchBackgroundFetchClickEventCallback& callback); | 201 DispatchBackgroundFetchClickEventCallback& callback); |
| 202 virtual void OnBackgroundFetchFailEvent( |
| 203 const std::string& tag, |
| 204 const std::vector<BackgroundFetchSettledFetch>& fetches, |
| 205 const mojom::ServiceWorkerEventDispatcher:: |
| 206 DispatchBackgroundFetchFailEventCallback& callback); |
| 207 virtual void OnBackgroundFetchedEvent( |
| 208 const std::string& tag, |
| 209 const std::vector<BackgroundFetchSettledFetch>& fetches, |
| 210 const mojom::ServiceWorkerEventDispatcher:: |
| 211 DispatchBackgroundFetchedEventCallback& callback); |
201 virtual void OnExtendableMessageEvent( | 212 virtual void OnExtendableMessageEvent( |
202 mojom::ExtendableMessageEventPtr event, | 213 mojom::ExtendableMessageEventPtr event, |
203 const mojom::ServiceWorkerEventDispatcher:: | 214 const mojom::ServiceWorkerEventDispatcher:: |
204 DispatchExtendableMessageEventCallback& callback); | 215 DispatchExtendableMessageEventCallback& callback); |
205 virtual void OnInstallEvent(int embedded_worker_id, int request_id); | 216 virtual void OnInstallEvent(int embedded_worker_id, int request_id); |
206 virtual void OnFetchEvent(int embedded_worker_id, | 217 virtual void OnFetchEvent(int embedded_worker_id, |
207 int fetch_event_id, | 218 int fetch_event_id, |
208 const ServiceWorkerFetchRequest& request, | 219 const ServiceWorkerFetchRequest& request, |
209 mojom::FetchEventPreloadHandlePtr preload_handle, | 220 mojom::FetchEventPreloadHandlePtr preload_handle, |
210 const FetchCallback& callback); | 221 const FetchCallback& callback); |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 callback); | 269 callback); |
259 void OnBackgroundFetchAbortEventStub( | 270 void OnBackgroundFetchAbortEventStub( |
260 const std::string& tag, | 271 const std::string& tag, |
261 const mojom::ServiceWorkerEventDispatcher:: | 272 const mojom::ServiceWorkerEventDispatcher:: |
262 DispatchBackgroundFetchAbortEventCallback& callback); | 273 DispatchBackgroundFetchAbortEventCallback& callback); |
263 void OnBackgroundFetchClickEventStub( | 274 void OnBackgroundFetchClickEventStub( |
264 const std::string& tag, | 275 const std::string& tag, |
265 mojom::BackgroundFetchState state, | 276 mojom::BackgroundFetchState state, |
266 const mojom::ServiceWorkerEventDispatcher:: | 277 const mojom::ServiceWorkerEventDispatcher:: |
267 DispatchBackgroundFetchClickEventCallback& callback); | 278 DispatchBackgroundFetchClickEventCallback& callback); |
| 279 void OnBackgroundFetchFailEventStub( |
| 280 const std::string& tag, |
| 281 const std::vector<BackgroundFetchSettledFetch>& fetches, |
| 282 const mojom::ServiceWorkerEventDispatcher:: |
| 283 DispatchBackgroundFetchFailEventCallback& callback); |
| 284 void OnBackgroundFetchedEventStub( |
| 285 const std::string& tag, |
| 286 const std::vector<BackgroundFetchSettledFetch>& fetches, |
| 287 const mojom::ServiceWorkerEventDispatcher:: |
| 288 DispatchBackgroundFetchedEventCallback& callback); |
268 void OnExtendableMessageEventStub( | 289 void OnExtendableMessageEventStub( |
269 mojom::ExtendableMessageEventPtr event, | 290 mojom::ExtendableMessageEventPtr event, |
270 const mojom::ServiceWorkerEventDispatcher:: | 291 const mojom::ServiceWorkerEventDispatcher:: |
271 DispatchExtendableMessageEventCallback& callback); | 292 DispatchExtendableMessageEventCallback& callback); |
272 void OnInstallEventStub(int request_id); | 293 void OnInstallEventStub(int request_id); |
273 void OnFetchEventStub(int thread_id, | 294 void OnFetchEventStub(int thread_id, |
274 int fetch_event_id, | 295 int fetch_event_id, |
275 const ServiceWorkerFetchRequest& request, | 296 const ServiceWorkerFetchRequest& request, |
276 mojom::FetchEventPreloadHandlePtr preload_handle, | 297 mojom::FetchEventPreloadHandlePtr preload_handle, |
277 const FetchCallback& callback); | 298 const FetchCallback& callback); |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 std::unique_ptr<MockType> mock = | 365 std::unique_ptr<MockType> mock = |
345 base::MakeUnique<MockType>(std::forward<Args>(args)...); | 366 base::MakeUnique<MockType>(std::forward<Args>(args)...); |
346 MockType* mock_rawptr = mock.get(); | 367 MockType* mock_rawptr = mock.get(); |
347 RegisterMockInstanceClient(std::move(mock)); | 368 RegisterMockInstanceClient(std::move(mock)); |
348 return mock_rawptr; | 369 return mock_rawptr; |
349 } | 370 } |
350 | 371 |
351 } // namespace content | 372 } // namespace content |
352 | 373 |
353 #endif // CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_TEST_HELPER_H_ | 374 #endif // CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_TEST_HELPER_H_ |
OLD | NEW |