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

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

Issue 475333002: [ServiceWorker] Sends the blob uuid of the request body to the ServiceWorker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: resolve blobs Created 6 years, 4 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_PROVIDER_HOST_H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_
7 7
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "content/browser/service_worker/service_worker_registration.h" 13 #include "content/browser/service_worker/service_worker_registration.h"
14 #include "content/common/content_export.h" 14 #include "content/common/content_export.h"
15 #include "content/common/service_worker/service_worker_types.h" 15 #include "content/common/service_worker/service_worker_types.h"
16 #include "content/public/common/resource_type.h" 16 #include "content/public/common/resource_type.h"
17 17
18 namespace IPC { 18 namespace IPC {
19 class Sender; 19 class Sender;
20 } 20 }
21 21
22 namespace webkit_blob { 22 namespace webkit_blob {
23 class BlobStorageContext; 23 class BlobStorageContext;
24 } 24 }
25 25
26 namespace content { 26 namespace content {
27 27
28 class ResourceRequestBody;
28 class ServiceWorkerContextCore; 29 class ServiceWorkerContextCore;
29 class ServiceWorkerDispatcherHost; 30 class ServiceWorkerDispatcherHost;
30 class ServiceWorkerRequestHandler; 31 class ServiceWorkerRequestHandler;
31 class ServiceWorkerVersion; 32 class ServiceWorkerVersion;
32 33
33 // This class is the browser-process representation of a service worker 34 // This class is the browser-process representation of a service worker
34 // provider. There is a provider per document and the lifetime of this 35 // provider. There is a provider per document and the lifetime of this
35 // object is tied to the lifetime of its document in the renderer process. 36 // object is tied to the lifetime of its document in the renderer process.
36 // This class holds service worker state that is scoped to an individual 37 // This class holds service worker state that is scoped to an individual
37 // document. 38 // document.
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 void UnassociateRegistration(); 86 void UnassociateRegistration();
86 87
87 // Returns false if the version is not in the expected STARTING in our 88 // Returns false if the version is not in the expected STARTING in our
88 // process state. That would be indicative of a bad IPC message. 89 // process state. That would be indicative of a bad IPC message.
89 bool SetHostedVersionId(int64 versions_id); 90 bool SetHostedVersionId(int64 versions_id);
90 91
91 // Returns a handler for a request, the handler may return NULL if 92 // Returns a handler for a request, the handler may return NULL if
92 // the request doesn't require special handling. 93 // the request doesn't require special handling.
93 scoped_ptr<ServiceWorkerRequestHandler> CreateRequestHandler( 94 scoped_ptr<ServiceWorkerRequestHandler> CreateRequestHandler(
94 ResourceType resource_type, 95 ResourceType resource_type,
95 base::WeakPtr<webkit_blob::BlobStorageContext> blob_storage_context); 96 base::WeakPtr<webkit_blob::BlobStorageContext> blob_storage_context,
97 scoped_refptr<ResourceRequestBody> body);
96 98
97 // Returns true if |registration| can be associated with this provider. 99 // Returns true if |registration| can be associated with this provider.
98 bool CanAssociateRegistration(ServiceWorkerRegistration* registration); 100 bool CanAssociateRegistration(ServiceWorkerRegistration* registration);
99 101
100 // Returns true if the context referred to by this host (i.e. |context_|) is 102 // Returns true if the context referred to by this host (i.e. |context_|) is
101 // still alive. 103 // still alive.
102 bool IsContextAlive(); 104 bool IsContextAlive();
103 105
104 // Dispatches message event to the document. 106 // Dispatches message event to the document.
105 void PostMessage(const base::string16& message, 107 void PostMessage(const base::string16& message,
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 scoped_refptr<ServiceWorkerVersion> running_hosted_version_; 157 scoped_refptr<ServiceWorkerVersion> running_hosted_version_;
156 base::WeakPtr<ServiceWorkerContextCore> context_; 158 base::WeakPtr<ServiceWorkerContextCore> context_;
157 ServiceWorkerDispatcherHost* dispatcher_host_; 159 ServiceWorkerDispatcherHost* dispatcher_host_;
158 160
159 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); 161 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost);
160 }; 162 };
161 163
162 } // namespace content 164 } // namespace content
163 165
164 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ 166 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698