| 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_CONTROLLEE_REQUEST_HANDLER
_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTROLLEE_REQUEST_HANDLER
_H_ |
| 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTROLLEE_REQUEST_HANDLER
_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTROLLEE_REQUEST_HANDLER
_H_ |
| 7 | 7 |
| 8 #include "base/gtest_prod_util.h" | 8 #include "base/gtest_prod_util.h" |
| 9 #include "content/browser/service_worker/service_worker_request_handler.h" | 9 #include "content/browser/service_worker/service_worker_request_handler.h" |
| 10 #include "content/common/service_worker/service_worker_types.h" | 10 #include "content/common/service_worker/service_worker_types.h" |
| 11 #include "content/public/common/request_context_frame_type.h" | 11 #include "content/public/common/request_context_frame_type.h" |
| 12 #include "content/public/common/request_context_type.h" | 12 #include "content/public/common/request_context_type.h" |
| 13 #include "content/public/common/resource_type.h" | 13 #include "content/public/common/resource_type.h" |
| 14 #include "third_party/WebKit/public/platform/WebServiceWorkerResponseType.h" |
| 14 | 15 |
| 15 namespace net { | 16 namespace net { |
| 16 class NetworkDelegate; | 17 class NetworkDelegate; |
| 17 class URLRequest; | 18 class URLRequest; |
| 18 } | 19 } |
| 19 | 20 |
| 20 namespace content { | 21 namespace content { |
| 21 | 22 |
| 22 class ResourceRequestBody; | 23 class ResourceRequestBody; |
| 23 class ServiceWorkerRegistration; | 24 class ServiceWorkerRegistration; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 44 // Called via custom URLRequestJobFactory. | 45 // Called via custom URLRequestJobFactory. |
| 45 virtual net::URLRequestJob* MaybeCreateJob( | 46 virtual net::URLRequestJob* MaybeCreateJob( |
| 46 net::URLRequest* request, | 47 net::URLRequest* request, |
| 47 net::NetworkDelegate* network_delegate, | 48 net::NetworkDelegate* network_delegate, |
| 48 ResourceContext* resource_context) override; | 49 ResourceContext* resource_context) override; |
| 49 | 50 |
| 50 virtual void GetExtraResponseInfo( | 51 virtual void GetExtraResponseInfo( |
| 51 bool* was_fetched_via_service_worker, | 52 bool* was_fetched_via_service_worker, |
| 52 bool* was_fallback_required_by_service_worker, | 53 bool* was_fallback_required_by_service_worker, |
| 53 GURL* original_url_via_service_worker, | 54 GURL* original_url_via_service_worker, |
| 55 blink::WebServiceWorkerResponseType* response_type_via_service_worker, |
| 54 base::TimeTicks* fetch_start_time, | 56 base::TimeTicks* fetch_start_time, |
| 55 base::TimeTicks* fetch_ready_time, | 57 base::TimeTicks* fetch_ready_time, |
| 56 base::TimeTicks* fetch_end_time) const override; | 58 base::TimeTicks* fetch_end_time) const override; |
| 57 | 59 |
| 58 private: | 60 private: |
| 59 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerControlleeRequestHandlerTest, | 61 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerControlleeRequestHandlerTest, |
| 60 ActivateWaitingVersion); | 62 ActivateWaitingVersion); |
| 61 typedef ServiceWorkerControlleeRequestHandler self; | 63 typedef ServiceWorkerControlleeRequestHandler self; |
| 62 | 64 |
| 63 // For main resource case. | 65 // For main resource case. |
| (...skipping 17 matching lines...) Expand all Loading... |
| 81 scoped_refptr<ResourceRequestBody> body_; | 83 scoped_refptr<ResourceRequestBody> body_; |
| 82 ResourceContext* resource_context_; | 84 ResourceContext* resource_context_; |
| 83 base::WeakPtrFactory<ServiceWorkerControlleeRequestHandler> weak_factory_; | 85 base::WeakPtrFactory<ServiceWorkerControlleeRequestHandler> weak_factory_; |
| 84 | 86 |
| 85 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerControlleeRequestHandler); | 87 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerControlleeRequestHandler); |
| 86 }; | 88 }; |
| 87 | 89 |
| 88 } // namespace content | 90 } // namespace content |
| 89 | 91 |
| 90 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTROLLEE_REQUEST_HAND
LER_H_ | 92 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTROLLEE_REQUEST_HAND
LER_H_ |
| OLD | NEW |