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