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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
87 ServiceWorkerVersion* running_hosted_version() const { | 87 ServiceWorkerVersion* running_hosted_version() const { |
88 return running_hosted_version_.get(); | 88 return running_hosted_version_.get(); |
89 } | 89 } |
90 | 90 |
91 void SetDocumentUrl(const GURL& url); | 91 void SetDocumentUrl(const GURL& url); |
92 const GURL& document_url() const { return document_url_; } | 92 const GURL& document_url() const { return document_url_; } |
93 | 93 |
94 void SetTopmostFrameUrl(const GURL& url); | 94 void SetTopmostFrameUrl(const GURL& url); |
95 const GURL& topmost_frame_url() const { return topmost_frame_url_; } | 95 const GURL& topmost_frame_url() const { return topmost_frame_url_; } |
96 | 96 |
97 // Starts using the |registration| which means the active worker will | |
98 // control this provider. | |
99 void UseRegistration(ServiceWorkerRegistration* registration); | |
falken
2015/01/28 08:59:49
This is better, but I'm still not a fan of this na
xiang
2015/01/29 02:58:37
You are right, the "use" will confuse people witho
| |
100 | |
97 // Associates to |registration| to listen for its version change events. | 101 // Associates to |registration| to listen for its version change events. |
falken
2015/01/28 08:59:49
It's not part of your patch, but this class no lon
| |
98 void AssociateRegistration(ServiceWorkerRegistration* registration); | 102 void AssociateRegistration(ServiceWorkerRegistration* registration); |
99 | 103 |
100 // Clears the associated registration and stop listening to it. | 104 // Clears the associated registration and stop listening to it. |
101 void DisassociateRegistration(); | 105 void DisassociateRegistration(); |
102 | 106 |
103 // Returns false if the version is not in the expected STARTING in our | 107 // Returns false if the version is not in the expected STARTING in our |
104 // process state. That would be indicative of a bad IPC message. | 108 // process state. That would be indicative of a bad IPC message. |
105 bool SetHostedVersionId(int64 versions_id); | 109 bool SetHostedVersionId(int64 versions_id); |
106 | 110 |
107 // Returns a handler for a request, the handler may return NULL if | 111 // Returns a handler for a request, the handler may return NULL if |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
191 base::WeakPtr<ServiceWorkerContextCore> context_; | 195 base::WeakPtr<ServiceWorkerContextCore> context_; |
192 ServiceWorkerDispatcherHost* dispatcher_host_; | 196 ServiceWorkerDispatcherHost* dispatcher_host_; |
193 bool allow_association_; | 197 bool allow_association_; |
194 | 198 |
195 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); | 199 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); |
196 }; | 200 }; |
197 | 201 |
198 } // namespace content | 202 } // namespace content |
199 | 203 |
200 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ | 204 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ |
OLD | NEW |