OLD | NEW |
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 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 // provider, the method will reset that field to NULL. | 87 // provider, the method will reset that field to NULL. |
88 void UnsetVersion(ServiceWorkerVersion* version); | 88 void UnsetVersion(ServiceWorkerVersion* version); |
89 | 89 |
90 // Returns false if the version is not in the expected STARTING in our | 90 // Returns false if the version is not in the expected STARTING in our |
91 // process state. That would be indicative of a bad IPC message. | 91 // process state. That would be indicative of a bad IPC message. |
92 bool SetHostedVersionId(int64 versions_id); | 92 bool SetHostedVersionId(int64 versions_id); |
93 | 93 |
94 // Returns a handler for a request, the handler may return NULL if | 94 // Returns a handler for a request, the handler may return NULL if |
95 // the request doesn't require special handling. | 95 // the request doesn't require special handling. |
96 scoped_ptr<ServiceWorkerRequestHandler> CreateRequestHandler( | 96 scoped_ptr<ServiceWorkerRequestHandler> CreateRequestHandler( |
97 ResourceType::Type resource_type, | 97 ResourceType resource_type, |
98 base::WeakPtr<webkit_blob::BlobStorageContext> blob_storage_context); | 98 base::WeakPtr<webkit_blob::BlobStorageContext> blob_storage_context); |
99 | 99 |
100 // Returns true if |version| can be associated with this provider. | 100 // Returns true if |version| can be associated with this provider. |
101 bool CanAssociateVersion(ServiceWorkerVersion* version); | 101 bool CanAssociateVersion(ServiceWorkerVersion* version); |
102 | 102 |
103 // Returns true if the context referred to by this host (i.e. |context_|) is | 103 // Returns true if the context referred to by this host (i.e. |context_|) is |
104 // still alive. | 104 // still alive. |
105 bool IsContextAlive(); | 105 bool IsContextAlive(); |
106 | 106 |
107 // Dispatches message event to the document. | 107 // Dispatches message event to the document. |
(...skipping 17 matching lines...) Expand all Loading... |
125 scoped_refptr<ServiceWorkerVersion> running_hosted_version_; | 125 scoped_refptr<ServiceWorkerVersion> running_hosted_version_; |
126 base::WeakPtr<ServiceWorkerContextCore> context_; | 126 base::WeakPtr<ServiceWorkerContextCore> context_; |
127 ServiceWorkerDispatcherHost* dispatcher_host_; | 127 ServiceWorkerDispatcherHost* dispatcher_host_; |
128 | 128 |
129 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); | 129 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); |
130 }; | 130 }; |
131 | 131 |
132 } // namespace content | 132 } // namespace content |
133 | 133 |
134 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ | 134 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ |
OLD | NEW |