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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 ServiceWorkerProviderHost(int process_id, | 46 ServiceWorkerProviderHost(int process_id, |
47 int provider_id, | 47 int provider_id, |
48 base::WeakPtr<ServiceWorkerContextCore> context, | 48 base::WeakPtr<ServiceWorkerContextCore> context, |
49 ServiceWorkerDispatcherHost* dispatcher_host); | 49 ServiceWorkerDispatcherHost* dispatcher_host); |
50 virtual ~ServiceWorkerProviderHost(); | 50 virtual ~ServiceWorkerProviderHost(); |
51 | 51 |
52 int process_id() const { return process_id_; } | 52 int process_id() const { return process_id_; } |
53 int provider_id() const { return provider_id_; } | 53 int provider_id() const { return provider_id_; } |
54 | 54 |
55 bool IsHostToRunningServiceWorker() { | 55 bool IsHostToRunningServiceWorker() { |
56 return running_hosted_version_ != NULL; | 56 return running_hosted_version_.get() != NULL; |
57 } | 57 } |
58 | 58 |
59 // Getters for the navigator.serviceWorker attribute values. | 59 // Getters for the navigator.serviceWorker attribute values. |
60 ServiceWorkerVersion* controlling_version() const { | 60 ServiceWorkerVersion* controlling_version() const { |
61 return controlling_version_.get(); | 61 return controlling_version_.get(); |
62 } | 62 } |
63 ServiceWorkerVersion* active_version() const { | 63 ServiceWorkerVersion* active_version() const { |
64 return active_version_.get(); | 64 return active_version_.get(); |
65 } | 65 } |
66 ServiceWorkerVersion* waiting_version() const { | 66 ServiceWorkerVersion* waiting_version() const { |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 scoped_refptr<ServiceWorkerVersion> running_hosted_version_; | 157 scoped_refptr<ServiceWorkerVersion> running_hosted_version_; |
158 base::WeakPtr<ServiceWorkerContextCore> context_; | 158 base::WeakPtr<ServiceWorkerContextCore> context_; |
159 ServiceWorkerDispatcherHost* dispatcher_host_; | 159 ServiceWorkerDispatcherHost* dispatcher_host_; |
160 | 160 |
161 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); | 161 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); |
162 }; | 162 }; |
163 | 163 |
164 } // namespace content | 164 } // namespace content |
165 | 165 |
166 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ | 166 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ |
OLD | NEW |