| 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 <memory> |
| 9 |
| 8 #include "base/callback.h" | 10 #include "base/callback.h" |
| 9 #include "base/macros.h" | 11 #include "base/macros.h" |
| 10 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
| 11 #include "content/browser/service_worker/service_worker_metrics.h" | 13 #include "content/browser/service_worker/service_worker_metrics.h" |
| 12 #include "content/common/content_export.h" | 14 #include "content/common/content_export.h" |
| 13 #include "content/common/service_worker/fetch_event_dispatcher.mojom.h" | 15 #include "content/common/service_worker/fetch_event_dispatcher.mojom.h" |
| 14 #include "content/common/service_worker/service_worker_status_code.h" | 16 #include "content/common/service_worker/service_worker_status_code.h" |
| 15 #include "content/common/service_worker/service_worker_types.h" | 17 #include "content/common/service_worker/service_worker_types.h" |
| 18 #include "content/common/url_loader.mojom.h" |
| 19 #include "content/common/url_loader_factory.mojom.h" |
| 16 #include "content/public/common/resource_type.h" | 20 #include "content/public/common/resource_type.h" |
| 17 #include "net/log/net_log_with_source.h" | 21 #include "net/log/net_log_with_source.h" |
| 18 | 22 |
| 19 namespace net { | 23 namespace net { |
| 20 class URLRequest; | 24 class URLRequest; |
| 21 } // namespace net | 25 } // namespace net |
| 22 | 26 |
| 23 namespace content { | 27 namespace content { |
| 24 | 28 |
| 25 class ServiceWorkerVersion; | 29 class ServiceWorkerVersion; |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 | 75 |
| 72 ServiceWorkerMetrics::EventType GetEventType() const; | 76 ServiceWorkerMetrics::EventType GetEventType() const; |
| 73 | 77 |
| 74 scoped_refptr<ServiceWorkerVersion> version_; | 78 scoped_refptr<ServiceWorkerVersion> version_; |
| 75 net::NetLogWithSource net_log_; | 79 net::NetLogWithSource net_log_; |
| 76 base::Closure prepare_callback_; | 80 base::Closure prepare_callback_; |
| 77 FetchCallback fetch_callback_; | 81 FetchCallback fetch_callback_; |
| 78 std::unique_ptr<ServiceWorkerFetchRequest> request_; | 82 std::unique_ptr<ServiceWorkerFetchRequest> request_; |
| 79 ResourceType resource_type_; | 83 ResourceType resource_type_; |
| 80 bool did_complete_; | 84 bool did_complete_; |
| 85 mojom::URLLoaderFactoryPtr url_loader_factory_; |
| 86 std::unique_ptr<mojom::URLLoader> url_loader_; |
| 87 std::unique_ptr<mojom::URLLoaderClient> url_loader_client_; |
| 81 mojom::FetchEventPreloadHandlePtr preload_handle_; | 88 mojom::FetchEventPreloadHandlePtr preload_handle_; |
| 82 | 89 |
| 83 base::WeakPtrFactory<ServiceWorkerFetchDispatcher> weak_factory_; | 90 base::WeakPtrFactory<ServiceWorkerFetchDispatcher> weak_factory_; |
| 84 | 91 |
| 85 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerFetchDispatcher); | 92 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerFetchDispatcher); |
| 86 }; | 93 }; |
| 87 | 94 |
| 88 } // namespace content | 95 } // namespace content |
| 89 | 96 |
| 90 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_FETCH_DISPATCHER_H_ | 97 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_FETCH_DISPATCHER_H_ |
| OLD | NEW |