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 // Dispatches message event to the document. | 159 // Dispatches message event to the document. |
160 void PostMessage( | 160 void PostMessage( |
161 const base::string16& message, | 161 const base::string16& message, |
162 const std::vector<TransferredMessagePort>& sent_message_ports); | 162 const std::vector<TransferredMessagePort>& sent_message_ports); |
163 | 163 |
164 // Activates the WebContents associated with | 164 // Activates the WebContents associated with |
165 // { render_process_id_, route_id_ }. | 165 // { render_process_id_, route_id_ }. |
166 // Runs the |callback| with the updated ServiceWorkerClientInfo in parameter. | 166 // Runs the |callback| with the updated ServiceWorkerClientInfo in parameter. |
167 void Focus(const GetClientInfoCallback& callback); | 167 void Focus(const GetClientInfoCallback& callback); |
168 | 168 |
| 169 // Runs the |callback| with the updated ServiceWorkerClientInfo in parameter. |
| 170 void Navigate(const GURL&, const GetClientInfoCallback& callback); |
| 171 |
169 // Asks the renderer to send back the document information. | 172 // Asks the renderer to send back the document information. |
170 void GetWindowClientInfo(const GetClientInfoCallback& callback) const; | 173 void GetWindowClientInfo(const GetClientInfoCallback& callback) const; |
171 | 174 |
172 // Same as above but has to be called from the UI thread. | 175 // Same as above but has to be called from the UI thread. |
173 // It is taking the process and frame ids in parameter because |this| is meant | 176 // It is taking the process and frame ids in parameter because |this| is meant |
174 // to live on the IO thread. | 177 // to live on the IO thread. |
175 static ServiceWorkerClientInfo GetWindowClientInfoOnUI(int render_process_id, | 178 static ServiceWorkerClientInfo GetWindowClientInfoOnUI(int render_process_id, |
176 int render_frame_id); | 179 int render_frame_id); |
177 | 180 |
178 // Adds reference of this host's process to the |pattern|, the reference will | 181 // Adds reference of this host's process to the |pattern|, the reference will |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 bool allow_association_; | 313 bool allow_association_; |
311 | 314 |
312 std::vector<base::Closure> queued_events_; | 315 std::vector<base::Closure> queued_events_; |
313 | 316 |
314 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); | 317 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); |
315 }; | 318 }; |
316 | 319 |
317 } // namespace content | 320 } // namespace content |
318 | 321 |
319 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ | 322 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ |
OLD | NEW |