| 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 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 // This class is the browser-process representation of a service worker | 34 // This class is the browser-process representation of a service worker |
| 35 // 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 |
| 36 // 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. |
| 37 // 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 |
| 38 // document. | 38 // document. |
| 39 // | 39 // |
| 40 // Note this class can also host a running service worker, in which | 40 // Note this class can also host a running service worker, in which |
| 41 // case it will observe resource loads made directly by the service worker. | 41 // case it will observe resource loads made directly by the service worker. |
| 42 class CONTENT_EXPORT ServiceWorkerProviderHost | 42 class CONTENT_EXPORT ServiceWorkerProviderHost |
| 43 : public ServiceWorkerRegistration::Listener, | 43 : public NON_EXPORTED_BASE(ServiceWorkerRegistration::Listener), |
| 44 public base::SupportsWeakPtr<ServiceWorkerProviderHost> { | 44 public base::SupportsWeakPtr<ServiceWorkerProviderHost> { |
| 45 public: | 45 public: |
| 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_; } |
| (...skipping 103 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 |