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_dispatcher_host.h" | 5 #include "content/browser/service_worker/service_worker_dispatcher_host.h" |
6 | 6 |
7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "content/browser/message_port_message_filter.h" | 10 #include "content/browser/message_port_message_filter.h" |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 return; | 238 return; |
239 } | 239 } |
240 TRACE_EVENT_ASYNC_BEGIN2("ServiceWorker", | 240 TRACE_EVENT_ASYNC_BEGIN2("ServiceWorker", |
241 "ServiceWorkerDispatcherHost::RegisterServiceWorker", | 241 "ServiceWorkerDispatcherHost::RegisterServiceWorker", |
242 request_id, | 242 request_id, |
243 "Pattern", pattern.spec(), | 243 "Pattern", pattern.spec(), |
244 "Script URL", script_url.spec()); | 244 "Script URL", script_url.spec()); |
245 GetContext()->RegisterServiceWorker( | 245 GetContext()->RegisterServiceWorker( |
246 pattern, | 246 pattern, |
247 script_url, | 247 script_url, |
248 render_process_id_, | |
249 provider_host, | 248 provider_host, |
250 base::Bind(&ServiceWorkerDispatcherHost::RegistrationComplete, | 249 base::Bind(&ServiceWorkerDispatcherHost::RegistrationComplete, |
251 this, | 250 this, |
252 thread_id, | 251 thread_id, |
253 provider_id, | 252 provider_id, |
254 request_id)); | 253 request_id)); |
255 } | 254 } |
256 | 255 |
257 void ServiceWorkerDispatcherHost::OnUnregisterServiceWorker( | 256 void ServiceWorkerDispatcherHost::OnUnregisterServiceWorker( |
258 int thread_id, | 257 int thread_id, |
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
630 status, &error_type, &error_message); | 629 status, &error_type, &error_message); |
631 Send(new ServiceWorkerMsg_ServiceWorkerUnregistrationError( | 630 Send(new ServiceWorkerMsg_ServiceWorkerUnregistrationError( |
632 thread_id, request_id, error_type, error_message)); | 631 thread_id, request_id, error_type, error_message)); |
633 } | 632 } |
634 | 633 |
635 ServiceWorkerContextCore* ServiceWorkerDispatcherHost::GetContext() { | 634 ServiceWorkerContextCore* ServiceWorkerDispatcherHost::GetContext() { |
636 return context_wrapper_->context(); | 635 return context_wrapper_->context(); |
637 } | 636 } |
638 | 637 |
639 } // namespace content | 638 } // namespace content |
OLD | NEW |