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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 ServiceWorkerVersion* waiting_version() const { | 63 ServiceWorkerVersion* waiting_version() const { |
64 return waiting_version_.get(); | 64 return waiting_version_.get(); |
65 } | 65 } |
66 | 66 |
67 // The running version, if any, that this provider is providing resource | 67 // The running version, if any, that this provider is providing resource |
68 // loads for. | 68 // loads for. |
69 ServiceWorkerVersion* running_hosted_version() const { | 69 ServiceWorkerVersion* running_hosted_version() const { |
70 return running_hosted_version_.get(); | 70 return running_hosted_version_.get(); |
71 } | 71 } |
72 | 72 |
73 void set_document_url(const GURL& url) { document_url_ = url; } | 73 void SetDocumentUrl(const GURL& url); |
74 const GURL& document_url() const { return document_url_; } | 74 const GURL& document_url() const { return document_url_; } |
75 | 75 |
76 // Associate |version| to this provider as its '.active' or '.waiting' | 76 // Associate |version| to this provider as its '.active' or '.waiting' |
77 // version. | 77 // version. |
78 // Giving NULL to this method will unset the corresponding field. | 78 // Giving NULL to this method will unset the corresponding field. |
79 void SetActiveVersion(ServiceWorkerVersion* version); | 79 void SetActiveVersion(ServiceWorkerVersion* version); |
80 void SetWaitingVersion(ServiceWorkerVersion* version); | 80 void SetWaitingVersion(ServiceWorkerVersion* version); |
81 | 81 |
82 // Returns false if the version is not in the expected STARTING in our | 82 // Returns false if the version is not in the expected STARTING in our |
83 // our process state. That would be indicative of a bad IPC message. | 83 // our process state. That would be indicative of a bad IPC message. |
(...skipping 18 matching lines...) Expand all Loading... |
102 scoped_refptr<ServiceWorkerVersion> running_hosted_version_; | 102 scoped_refptr<ServiceWorkerVersion> running_hosted_version_; |
103 base::WeakPtr<ServiceWorkerContextCore> context_; | 103 base::WeakPtr<ServiceWorkerContextCore> context_; |
104 ServiceWorkerDispatcherHost* dispatcher_host_; | 104 ServiceWorkerDispatcherHost* dispatcher_host_; |
105 | 105 |
106 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); | 106 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); |
107 }; | 107 }; |
108 | 108 |
109 } // namespace content | 109 } // namespace content |
110 | 110 |
111 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ | 111 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ |
OLD | NEW |