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_SERVICE_WORKER_FETCH_DISPATCHER_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_FETCH_DISPATCHER_H_ |
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_FETCH_DISPATCHER_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_FETCH_DISPATCHER_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
11 #include "content/browser/service_worker/service_worker_metrics.h" | 11 #include "content/browser/service_worker/service_worker_metrics.h" |
12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
13 #include "content/common/service_worker/service_worker_status_code.h" | 13 #include "content/common/service_worker/service_worker_status_code.h" |
14 #include "content/common/service_worker/service_worker_types.h" | 14 #include "content/common/service_worker/service_worker_types.h" |
15 #include "content/public/common/resource_type.h" | 15 #include "content/public/common/resource_type.h" |
16 #include "net/log/net_log.h" | 16 #include "net/log/net_log_with_source.h" |
17 | 17 |
18 namespace content { | 18 namespace content { |
19 | 19 |
20 class ServiceWorkerVersion; | 20 class ServiceWorkerVersion; |
21 | 21 |
22 // A helper class to dispatch fetch event to a service worker. | 22 // A helper class to dispatch fetch event to a service worker. |
23 class CONTENT_EXPORT ServiceWorkerFetchDispatcher { | 23 class CONTENT_EXPORT ServiceWorkerFetchDispatcher { |
24 public: | 24 public: |
25 typedef base::Callback<void(ServiceWorkerStatusCode, | 25 typedef base::Callback<void(ServiceWorkerStatusCode, |
26 ServiceWorkerFetchEventResult, | 26 ServiceWorkerFetchEventResult, |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 ResourceType resource_type_; | 70 ResourceType resource_type_; |
71 bool did_complete_; | 71 bool did_complete_; |
72 base::WeakPtrFactory<ServiceWorkerFetchDispatcher> weak_factory_; | 72 base::WeakPtrFactory<ServiceWorkerFetchDispatcher> weak_factory_; |
73 | 73 |
74 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerFetchDispatcher); | 74 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerFetchDispatcher); |
75 }; | 75 }; |
76 | 76 |
77 } // namespace content | 77 } // namespace content |
78 | 78 |
79 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_FETCH_DISPATCHER_H_ | 79 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_FETCH_DISPATCHER_H_ |
OLD | NEW |