Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(636)

Side by Side Diff: content/browser/service_worker/service_worker_controllee_request_handler.h

Issue 588153002: [ServiceWorker] Plumbing the request mode from the renderer to the ServiceWorker. [2/2 chromium] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix compile error Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 11
11 namespace net { 12 namespace net {
12 class NetworkDelegate; 13 class NetworkDelegate;
13 class URLRequest; 14 class URLRequest;
14 } 15 }
15 16
16 namespace content { 17 namespace content {
17 18
18 class ResourceRequestBody; 19 class ResourceRequestBody;
19 class ServiceWorkerRegistration; 20 class ServiceWorkerRegistration;
20 class ServiceWorkerURLRequestJob; 21 class ServiceWorkerURLRequestJob;
21 class ServiceWorkerVersion; 22 class ServiceWorkerVersion;
22 23
23 // A request handler derivative used to handle requests from 24 // A request handler derivative used to handle requests from
24 // controlled documents. 25 // controlled documents.
25 class CONTENT_EXPORT ServiceWorkerControlleeRequestHandler 26 class CONTENT_EXPORT ServiceWorkerControlleeRequestHandler
26 : public ServiceWorkerRequestHandler { 27 : public ServiceWorkerRequestHandler {
27 public: 28 public:
28 ServiceWorkerControlleeRequestHandler( 29 ServiceWorkerControlleeRequestHandler(
29 base::WeakPtr<ServiceWorkerContextCore> context, 30 base::WeakPtr<ServiceWorkerContextCore> context,
30 base::WeakPtr<ServiceWorkerProviderHost> provider_host, 31 base::WeakPtr<ServiceWorkerProviderHost> provider_host,
31 base::WeakPtr<storage::BlobStorageContext> blob_storage_context, 32 base::WeakPtr<storage::BlobStorageContext> blob_storage_context,
33 FetchRequestMode request_mode,
32 ResourceType resource_type, 34 ResourceType resource_type,
33 scoped_refptr<ResourceRequestBody> body); 35 scoped_refptr<ResourceRequestBody> body);
34 virtual ~ServiceWorkerControlleeRequestHandler(); 36 virtual ~ServiceWorkerControlleeRequestHandler();
35 37
36 // Called via custom URLRequestJobFactory. 38 // Called via custom URLRequestJobFactory.
37 virtual net::URLRequestJob* MaybeCreateJob( 39 virtual net::URLRequestJob* MaybeCreateJob(
38 net::URLRequest* request, 40 net::URLRequest* request,
39 net::NetworkDelegate* network_delegate) OVERRIDE; 41 net::NetworkDelegate* network_delegate) OVERRIDE;
40 42
41 virtual void GetExtraResponseInfo( 43 virtual void GetExtraResponseInfo(
(...skipping 15 matching lines...) Expand all
57 const scoped_refptr<ServiceWorkerRegistration>& registration); 59 const scoped_refptr<ServiceWorkerRegistration>& registration);
58 void OnVersionStatusChanged( 60 void OnVersionStatusChanged(
59 ServiceWorkerRegistration* registration, 61 ServiceWorkerRegistration* registration,
60 ServiceWorkerVersion* version); 62 ServiceWorkerVersion* version);
61 63
62 // For sub resource case. 64 // For sub resource case.
63 void PrepareForSubResource(); 65 void PrepareForSubResource();
64 66
65 bool is_main_resource_load_; 67 bool is_main_resource_load_;
66 scoped_refptr<ServiceWorkerURLRequestJob> job_; 68 scoped_refptr<ServiceWorkerURLRequestJob> job_;
69 FetchRequestMode request_mode_;
67 scoped_refptr<ResourceRequestBody> body_; 70 scoped_refptr<ResourceRequestBody> body_;
68 base::WeakPtrFactory<ServiceWorkerControlleeRequestHandler> weak_factory_; 71 base::WeakPtrFactory<ServiceWorkerControlleeRequestHandler> weak_factory_;
69 72
70 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerControlleeRequestHandler); 73 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerControlleeRequestHandler);
71 }; 74 };
72 75
73 } // namespace content 76 } // namespace content
74 77
75 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTROLLEE_REQUEST_HAND LER_H_ 78 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTROLLEE_REQUEST_HAND LER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698