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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 } | 65 } |
66 ServiceWorkerVersion* waiting_version() const { | 66 ServiceWorkerVersion* waiting_version() const { |
67 return associated_registration_.get() ? | 67 return associated_registration_.get() ? |
68 associated_registration_->waiting_version() : NULL; | 68 associated_registration_->waiting_version() : NULL; |
69 } | 69 } |
70 ServiceWorkerVersion* installing_version() const { | 70 ServiceWorkerVersion* installing_version() const { |
71 return associated_registration_.get() ? | 71 return associated_registration_.get() ? |
72 associated_registration_->installing_version() : NULL; | 72 associated_registration_->installing_version() : NULL; |
73 } | 73 } |
74 | 74 |
| 75 ServiceWorkerRegistration* associated_registration() const { |
| 76 return associated_registration_.get(); |
| 77 } |
| 78 |
75 // The running version, if any, that this provider is providing resource | 79 // The running version, if any, that this provider is providing resource |
76 // loads for. | 80 // loads for. |
77 ServiceWorkerVersion* running_hosted_version() const { | 81 ServiceWorkerVersion* running_hosted_version() const { |
78 return running_hosted_version_.get(); | 82 return running_hosted_version_.get(); |
79 } | 83 } |
80 | 84 |
81 void SetDocumentUrl(const GURL& url); | 85 void SetDocumentUrl(const GURL& url); |
82 const GURL& document_url() const { return document_url_; } | 86 const GURL& document_url() const { return document_url_; } |
83 | 87 |
84 // Associates to |registration| to listen for its version change events. | 88 // Associates to |registration| to listen for its version change events. |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 base::WeakPtr<ServiceWorkerContextCore> context_; | 158 base::WeakPtr<ServiceWorkerContextCore> context_; |
155 ServiceWorkerDispatcherHost* dispatcher_host_; | 159 ServiceWorkerDispatcherHost* dispatcher_host_; |
156 bool allow_association_; | 160 bool allow_association_; |
157 | 161 |
158 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); | 162 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); |
159 }; | 163 }; |
160 | 164 |
161 } // namespace content | 165 } // namespace content |
162 | 166 |
163 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ | 167 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ |
OLD | NEW |