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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 void ServiceWorkerProviderHost::Focus(const FocusCallback& callback) { | 289 void ServiceWorkerProviderHost::Focus(const FocusCallback& callback) { |
290 BrowserThread::PostTask( | 290 BrowserThread::PostTask( |
291 BrowserThread::UI, FROM_HERE, | 291 BrowserThread::UI, FROM_HERE, |
292 base::Bind(&FocusOnUIThread, | 292 base::Bind(&FocusOnUIThread, |
293 render_process_id_, | 293 render_process_id_, |
294 render_frame_id_, | 294 render_frame_id_, |
295 callback)); | 295 callback)); |
296 } | 296 } |
297 | 297 |
298 void ServiceWorkerProviderHost::GetClientInfo( | 298 void ServiceWorkerProviderHost::GetClientInfo( |
299 const GetClientInfoCallback& callback) { | 299 const GetClientInfoCallback& callback) const { |
300 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, | 300 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, |
301 base::Bind(&GetClientInfoOnUIThread, | 301 base::Bind(&GetClientInfoOnUIThread, |
302 render_process_id_, | 302 render_process_id_, |
303 render_frame_id_, | 303 render_frame_id_, |
304 callback)); | 304 callback)); |
305 } | 305 } |
306 | 306 |
307 void ServiceWorkerProviderHost::AddScopedProcessReferenceToPattern( | 307 void ServiceWorkerProviderHost::AddScopedProcessReferenceToPattern( |
308 const GURL& pattern) { | 308 const GURL& pattern) { |
309 associated_patterns_.push_back(pattern); | 309 associated_patterns_.push_back(pattern); |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
486 return context_ != NULL; | 486 return context_ != NULL; |
487 } | 487 } |
488 | 488 |
489 void ServiceWorkerProviderHost::Send(IPC::Message* message) const { | 489 void ServiceWorkerProviderHost::Send(IPC::Message* message) const { |
490 DCHECK(dispatcher_host_); | 490 DCHECK(dispatcher_host_); |
491 DCHECK(IsReadyToSendMessages()); | 491 DCHECK(IsReadyToSendMessages()); |
492 dispatcher_host_->Send(message); | 492 dispatcher_host_->Send(message); |
493 } | 493 } |
494 | 494 |
495 } // namespace content | 495 } // namespace content |
OLD | NEW |