| 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 // For use by the ServiceWorkerControlleeRequestHandler to disallow | 159 // For use by the ServiceWorkerControlleeRequestHandler to disallow |
| 160 // new registration association while a navigation is occurring and | 160 // new registration association while a navigation is occurring and |
| 161 // an existing registration is being looked for. | 161 // an existing registration is being looked for. |
| 162 void SetAllowAssociation(bool allow) { allow_association_ = allow; } | 162 void SetAllowAssociation(bool allow) { allow_association_ = allow; } |
| 163 | 163 |
| 164 // Returns true if the context referred to by this host (i.e. |context_|) is | 164 // Returns true if the context referred to by this host (i.e. |context_|) is |
| 165 // still alive. | 165 // still alive. |
| 166 bool IsContextAlive(); | 166 bool IsContextAlive(); |
| 167 | 167 |
| 168 // Dispatches message event to the document. | 168 // Dispatches message event to the document. |
| 169 void PostMessage( | 169 void PostMessageToClient( |
| 170 ServiceWorkerVersion* version, | 170 ServiceWorkerVersion* version, |
| 171 const base::string16& message, | 171 const base::string16& message, |
| 172 const std::vector<TransferredMessagePort>& sent_message_ports); | 172 const std::vector<TransferredMessagePort>& sent_message_ports); |
| 173 | 173 |
| 174 // Activates the WebContents associated with | 174 // Activates the WebContents associated with |
| 175 // { render_process_id_, route_id_ }. | 175 // { render_process_id_, route_id_ }. |
| 176 // Runs the |callback| with the updated ServiceWorkerClientInfo in parameter. | 176 // Runs the |callback| with the updated ServiceWorkerClientInfo in parameter. |
| 177 void Focus(const GetClientInfoCallback& callback); | 177 void Focus(const GetClientInfoCallback& callback); |
| 178 | 178 |
| 179 // Asks the renderer to send back the document information. | 179 // Asks the renderer to send back the document information. |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 bool allow_association_; | 335 bool allow_association_; |
| 336 | 336 |
| 337 std::vector<base::Closure> queued_events_; | 337 std::vector<base::Closure> queued_events_; |
| 338 | 338 |
| 339 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); | 339 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); |
| 340 }; | 340 }; |
| 341 | 341 |
| 342 } // namespace content | 342 } // namespace content |
| 343 | 343 |
| 344 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ | 344 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ |
| OLD | NEW |