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 #include "content/browser/service_worker/service_worker_provider_host.h" | 5 #include "content/browser/service_worker/service_worker_provider_host.h" |
6 | 6 |
7 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
8 #include "content/browser/message_port_message_filter.h" | 8 #include "content/browser/message_port_message_filter.h" |
9 #include "content/browser/service_worker/service_worker_context_core.h" | 9 #include "content/browser/service_worker/service_worker_context_core.h" |
10 #include "content/browser/service_worker/service_worker_context_request_handler.
h" | 10 #include "content/browser/service_worker/service_worker_context_request_handler.
h" |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 | 220 |
221 void ServiceWorkerProviderHost::Focus(const FocusCallback& callback) { | 221 void ServiceWorkerProviderHost::Focus(const FocusCallback& callback) { |
222 BrowserThread::PostTask( | 222 BrowserThread::PostTask( |
223 BrowserThread::UI, FROM_HERE, | 223 BrowserThread::UI, FROM_HERE, |
224 base::Bind(&FocusOnUIThread, | 224 base::Bind(&FocusOnUIThread, |
225 render_process_id_, | 225 render_process_id_, |
226 render_frame_id_, | 226 render_frame_id_, |
227 callback)); | 227 callback)); |
228 } | 228 } |
229 | 229 |
| 230 void ServiceWorkerProviderHost::GetClientInfo( |
| 231 int embedded_worker_id, |
| 232 int request_id) { |
| 233 dispatcher_host_->Send(new ServiceWorkerMsg_GetClientInfo( |
| 234 kDocumentMainThreadId, embedded_worker_id, request_id, provider_id())); |
| 235 } |
| 236 |
230 void ServiceWorkerProviderHost::AddScopedProcessReferenceToPattern( | 237 void ServiceWorkerProviderHost::AddScopedProcessReferenceToPattern( |
231 const GURL& pattern) { | 238 const GURL& pattern) { |
232 associated_patterns_.push_back(pattern); | 239 associated_patterns_.push_back(pattern); |
233 IncreaseProcessReference(pattern); | 240 IncreaseProcessReference(pattern); |
234 } | 241 } |
235 | 242 |
236 void ServiceWorkerProviderHost::PrepareForCrossSiteTransfer() { | 243 void ServiceWorkerProviderHost::PrepareForCrossSiteTransfer() { |
237 DCHECK_NE(ChildProcessHost::kInvalidUniqueID, render_process_id_); | 244 DCHECK_NE(ChildProcessHost::kInvalidUniqueID, render_process_id_); |
238 | 245 |
239 for (const GURL& pattern : associated_patterns_) | 246 for (const GURL& pattern : associated_patterns_) |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 context_->process_manager()->RemoveProcessReferenceFromPattern( | 332 context_->process_manager()->RemoveProcessReferenceFromPattern( |
326 pattern, render_process_id_); | 333 pattern, render_process_id_); |
327 } | 334 } |
328 } | 335 } |
329 | 336 |
330 bool ServiceWorkerProviderHost::IsContextAlive() { | 337 bool ServiceWorkerProviderHost::IsContextAlive() { |
331 return context_ != NULL; | 338 return context_ != NULL; |
332 } | 339 } |
333 | 340 |
334 } // namespace content | 341 } // namespace content |
OLD | NEW |