| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 ServiceWorkerVersion* installing_version() const { | 69 ServiceWorkerVersion* installing_version() const { |
| 70 return installing_version_.get(); | 70 return installing_version_.get(); |
| 71 } | 71 } |
| 72 | 72 |
| 73 // The running version, if any, that this provider is providing resource | 73 // The running version, if any, that this provider is providing resource |
| 74 // loads for. | 74 // loads for. |
| 75 ServiceWorkerVersion* running_hosted_version() const { | 75 ServiceWorkerVersion* running_hosted_version() const { |
| 76 return running_hosted_version_.get(); | 76 return running_hosted_version_.get(); |
| 77 } | 77 } |
| 78 | 78 |
| 79 ServiceWorkerRegistration* associated_registration() const { |
| 80 return associated_registration_.get(); |
| 81 } |
| 82 |
| 79 void SetDocumentUrl(const GURL& url); | 83 void SetDocumentUrl(const GURL& url); |
| 80 const GURL& document_url() const { return document_url_; } | 84 const GURL& document_url() const { return document_url_; } |
| 81 | 85 |
| 82 // Associates to |registration| to listen for its version change events. | 86 // Associates to |registration| to listen for its version change events. |
| 83 void AssociateRegistration(ServiceWorkerRegistration* registration); | 87 void AssociateRegistration(ServiceWorkerRegistration* registration); |
| 84 | 88 |
| 85 // Clears the associated registration and stop listening to it. | 89 // Clears the associated registration and stop listening to it. |
| 86 void UnassociateRegistration(); | 90 void UnassociateRegistration(); |
| 87 | 91 |
| 88 // Returns false if the version is not in the expected STARTING in our | 92 // Returns false if the version is not in the expected STARTING in our |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 scoped_refptr<ServiceWorkerVersion> running_hosted_version_; | 155 scoped_refptr<ServiceWorkerVersion> running_hosted_version_; |
| 152 base::WeakPtr<ServiceWorkerContextCore> context_; | 156 base::WeakPtr<ServiceWorkerContextCore> context_; |
| 153 ServiceWorkerDispatcherHost* dispatcher_host_; | 157 ServiceWorkerDispatcherHost* dispatcher_host_; |
| 154 | 158 |
| 155 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); | 159 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); |
| 156 }; | 160 }; |
| 157 | 161 |
| 158 } // namespace content | 162 } // namespace content |
| 159 | 163 |
| 160 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ | 164 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ |
| OLD | NEW |