| 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 return running_hosted_version_.get(); | 99 return running_hosted_version_.get(); |
| 100 } | 100 } |
| 101 | 101 |
| 102 void SetDocumentUrl(const GURL& url); | 102 void SetDocumentUrl(const GURL& url); |
| 103 const GURL& document_url() const { return document_url_; } | 103 const GURL& document_url() const { return document_url_; } |
| 104 | 104 |
| 105 void SetTopmostFrameUrl(const GURL& url); | 105 void SetTopmostFrameUrl(const GURL& url); |
| 106 const GURL& topmost_frame_url() const { return topmost_frame_url_; } | 106 const GURL& topmost_frame_url() const { return topmost_frame_url_; } |
| 107 | 107 |
| 108 ServiceWorkerProviderType provider_type() const { return provider_type_; } | 108 ServiceWorkerProviderType provider_type() const { return provider_type_; } |
| 109 bool IsProviderForClient() const; |
| 109 blink::WebServiceWorkerClientType client_type() const; | 110 blink::WebServiceWorkerClientType client_type() const; |
| 110 | 111 |
| 111 // Associates to |registration| to listen for its version change events and | 112 // Associates to |registration| to listen for its version change events and |
| 112 // sets the controller. If |notify_controllerchange| is true, instructs the | 113 // sets the controller. If |notify_controllerchange| is true, instructs the |
| 113 // renderer to dispatch a 'controllerchange' event. | 114 // renderer to dispatch a 'controllerchange' event. |
| 114 void AssociateRegistration(ServiceWorkerRegistration* registration, | 115 void AssociateRegistration(ServiceWorkerRegistration* registration, |
| 115 bool notify_controllerchange); | 116 bool notify_controllerchange); |
| 116 | 117 |
| 117 // Clears the associated registration and stop listening to it. | 118 // Clears the associated registration and stop listening to it. |
| 118 void DisassociateRegistration(); | 119 void DisassociateRegistration(); |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 bool allow_association_; | 291 bool allow_association_; |
| 291 | 292 |
| 292 std::vector<base::Closure> queued_events_; | 293 std::vector<base::Closure> queued_events_; |
| 293 | 294 |
| 294 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); | 295 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); |
| 295 }; | 296 }; |
| 296 | 297 |
| 297 } // namespace content | 298 } // namespace content |
| 298 | 299 |
| 299 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ | 300 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ |
| OLD | NEW |