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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 const std::vector<TransferredMessagePort>& sent_message_ports); | 148 const std::vector<TransferredMessagePort>& sent_message_ports); |
149 | 149 |
150 // Activates the WebContents associated with | 150 // Activates the WebContents associated with |
151 // { render_process_id_, render_frame_id_ }. | 151 // { render_process_id_, render_frame_id_ }. |
152 // Runs the |callback| with the updated ServiceWorkerClientInfo in parameter. | 152 // Runs the |callback| with the updated ServiceWorkerClientInfo in parameter. |
153 void Focus(const GetClientInfoCallback& callback); | 153 void Focus(const GetClientInfoCallback& callback); |
154 | 154 |
155 // Asks the renderer to send back the document information. | 155 // Asks the renderer to send back the document information. |
156 void GetClientInfo(const GetClientInfoCallback& callback) const; | 156 void GetClientInfo(const GetClientInfoCallback& callback) const; |
157 | 157 |
| 158 // Same as above but has to be called from the UI thread. |
| 159 // It is taking the process and frame ids in parameter because |this| is meant |
| 160 // to live on the IO thread. |
| 161 static ServiceWorkerClientInfo GetClientInfoOnUI(int render_process_id, |
| 162 int render_frame_id); |
| 163 |
158 // Adds reference of this host's process to the |pattern|, the reference will | 164 // Adds reference of this host's process to the |pattern|, the reference will |
159 // be removed in destructor. | 165 // be removed in destructor. |
160 void AddScopedProcessReferenceToPattern(const GURL& pattern); | 166 void AddScopedProcessReferenceToPattern(const GURL& pattern); |
161 | 167 |
162 // |registration| claims the document to be controlled. | 168 // |registration| claims the document to be controlled. |
163 void ClaimedByRegistration(ServiceWorkerRegistration* registration); | 169 void ClaimedByRegistration(ServiceWorkerRegistration* registration); |
164 | 170 |
165 // Methods to support cross site navigations. | 171 // Methods to support cross site navigations. |
166 void PrepareForCrossSiteTransfer(); | 172 void PrepareForCrossSiteTransfer(); |
167 void CompleteCrossSiteTransfer( | 173 void CompleteCrossSiteTransfer( |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 bool is_claiming_; | 241 bool is_claiming_; |
236 | 242 |
237 std::vector<base::Closure> queued_events_; | 243 std::vector<base::Closure> queued_events_; |
238 | 244 |
239 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); | 245 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); |
240 }; | 246 }; |
241 | 247 |
242 } // namespace content | 248 } // namespace content |
243 | 249 |
244 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ | 250 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ |
OLD | NEW |