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/renderer/service_worker/embedded_worker_context_client.h" | 5 #include "content/renderer/service_worker/embedded_worker_context_client.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 int embedded_worker_id, | 96 int embedded_worker_id, |
97 int64 service_worker_version_id, | 97 int64 service_worker_version_id, |
98 const GURL& service_worker_scope, | 98 const GURL& service_worker_scope, |
99 const GURL& script_url, | 99 const GURL& script_url, |
100 int worker_devtools_agent_route_id) | 100 int worker_devtools_agent_route_id) |
101 : embedded_worker_id_(embedded_worker_id), | 101 : embedded_worker_id_(embedded_worker_id), |
102 service_worker_version_id_(service_worker_version_id), | 102 service_worker_version_id_(service_worker_version_id), |
103 service_worker_scope_(service_worker_scope), | 103 service_worker_scope_(service_worker_scope), |
104 script_url_(script_url), | 104 script_url_(script_url), |
105 worker_devtools_agent_route_id_(worker_devtools_agent_route_id), | 105 worker_devtools_agent_route_id_(worker_devtools_agent_route_id), |
106 sender_(ChildThread::current()->thread_safe_sender()), | 106 sender_(ChildThreadImpl::current()->thread_safe_sender()), |
107 main_thread_proxy_(base::MessageLoopProxy::current()), | 107 main_thread_proxy_(base::MessageLoopProxy::current()), |
108 weak_factory_(this) { | 108 weak_factory_(this) { |
109 TRACE_EVENT_ASYNC_BEGIN0("ServiceWorker", | 109 TRACE_EVENT_ASYNC_BEGIN0("ServiceWorker", |
110 "EmbeddedWorkerContextClient::StartingWorkerContext", | 110 "EmbeddedWorkerContextClient::StartingWorkerContext", |
111 this); | 111 this); |
112 TRACE_EVENT_ASYNC_STEP_INTO0( | 112 TRACE_EVENT_ASYNC_STEP_INTO0( |
113 "ServiceWorker", | 113 "ServiceWorker", |
114 "EmbeddedWorkerContextClient::StartingWorkerContext", | 114 "EmbeddedWorkerContextClient::StartingWorkerContext", |
115 this, | 115 this, |
116 "PrepareWorker"); | 116 "PrepareWorker"); |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 registration->SetWaiting( | 435 registration->SetWaiting( |
436 dispatcher->GetServiceWorker(attrs.waiting, false)); | 436 dispatcher->GetServiceWorker(attrs.waiting, false)); |
437 registration->SetActive( | 437 registration->SetActive( |
438 dispatcher->GetServiceWorker(attrs.active, false)); | 438 dispatcher->GetServiceWorker(attrs.active, false)); |
439 | 439 |
440 script_context_->SetRegistrationInServiceWorkerGlobalScope( | 440 script_context_->SetRegistrationInServiceWorkerGlobalScope( |
441 registration.Pass()); | 441 registration.Pass()); |
442 } | 442 } |
443 | 443 |
444 } // namespace content | 444 } // namespace content |
OLD | NEW |