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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 // new registration association while a navigation is occurring and | 151 // new registration association while a navigation is occurring and |
152 // an existing registration is being looked for. | 152 // an existing registration is being looked for. |
153 void SetAllowAssociation(bool allow) { allow_association_ = allow; } | 153 void SetAllowAssociation(bool allow) { allow_association_ = allow; } |
154 | 154 |
155 // Returns true if the context referred to by this host (i.e. |context_|) is | 155 // Returns true if the context referred to by this host (i.e. |context_|) is |
156 // still alive. | 156 // still alive. |
157 bool IsContextAlive(); | 157 bool IsContextAlive(); |
158 | 158 |
159 // Dispatches message event to the document. | 159 // Dispatches message event to the document. |
160 void PostMessage( | 160 void PostMessage( |
| 161 ServiceWorkerVersion* version, |
161 const base::string16& message, | 162 const base::string16& message, |
162 const std::vector<TransferredMessagePort>& sent_message_ports); | 163 const std::vector<TransferredMessagePort>& sent_message_ports); |
163 | 164 |
164 // Activates the WebContents associated with | 165 // Activates the WebContents associated with |
165 // { render_process_id_, route_id_ }. | 166 // { render_process_id_, route_id_ }. |
166 // Runs the |callback| with the updated ServiceWorkerClientInfo in parameter. | 167 // Runs the |callback| with the updated ServiceWorkerClientInfo in parameter. |
167 void Focus(const GetClientInfoCallback& callback); | 168 void Focus(const GetClientInfoCallback& callback); |
168 | 169 |
169 // Asks the renderer to send back the document information. | 170 // Asks the renderer to send back the document information. |
170 void GetWindowClientInfo(const GetClientInfoCallback& callback) const; | 171 void GetWindowClientInfo(const GetClientInfoCallback& callback) const; |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 bool allow_association_; | 311 bool allow_association_; |
311 | 312 |
312 std::vector<base::Closure> queued_events_; | 313 std::vector<base::Closure> queued_events_; |
313 | 314 |
314 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); | 315 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); |
315 }; | 316 }; |
316 | 317 |
317 } // namespace content | 318 } // namespace content |
318 | 319 |
319 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ | 320 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ |
OLD | NEW |