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/frame_host/render_frame_host_impl.h" | 8 #include "content/browser/frame_host/render_frame_host_impl.h" |
9 #include "content/browser/message_port_message_filter.h" | 9 #include "content/browser/message_port_message_filter.h" |
10 #include "content/browser/service_worker/service_worker_context_core.h" | 10 #include "content/browser/service_worker/service_worker_context_core.h" |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 void ServiceWorkerProviderHost::Focus(const FocusCallback& callback) { | 288 void ServiceWorkerProviderHost::Focus(const FocusCallback& callback) { |
289 BrowserThread::PostTask( | 289 BrowserThread::PostTask( |
290 BrowserThread::UI, FROM_HERE, | 290 BrowserThread::UI, FROM_HERE, |
291 base::Bind(&FocusOnUIThread, | 291 base::Bind(&FocusOnUIThread, |
292 render_process_id_, | 292 render_process_id_, |
293 render_frame_id_, | 293 render_frame_id_, |
294 callback)); | 294 callback)); |
295 } | 295 } |
296 | 296 |
297 void ServiceWorkerProviderHost::GetClientInfo( | 297 void ServiceWorkerProviderHost::GetClientInfo( |
298 const GetClientInfoCallback& callback) { | 298 const GetClientInfoCallback& callback) const { |
299 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, | 299 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, |
300 base::Bind(&GetClientInfoOnUIThread, | 300 base::Bind(&GetClientInfoOnUIThread, |
301 render_process_id_, | 301 render_process_id_, |
302 render_frame_id_, | 302 render_frame_id_, |
303 callback)); | 303 callback)); |
304 } | 304 } |
305 | 305 |
306 void ServiceWorkerProviderHost::AddScopedProcessReferenceToPattern( | 306 void ServiceWorkerProviderHost::AddScopedProcessReferenceToPattern( |
307 const GURL& pattern) { | 307 const GURL& pattern) { |
308 associated_patterns_.push_back(pattern); | 308 associated_patterns_.push_back(pattern); |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 return context_ != NULL; | 498 return context_ != NULL; |
499 } | 499 } |
500 | 500 |
501 void ServiceWorkerProviderHost::Send(IPC::Message* message) const { | 501 void ServiceWorkerProviderHost::Send(IPC::Message* message) const { |
502 DCHECK(dispatcher_host_); | 502 DCHECK(dispatcher_host_); |
503 DCHECK(IsReadyToSendMessages()); | 503 DCHECK(IsReadyToSendMessages()); |
504 dispatcher_host_->Send(message); | 504 dispatcher_host_->Send(message); |
505 } | 505 } |
506 | 506 |
507 } // namespace content | 507 } // namespace content |
OLD | NEW |