| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/child/service_worker/service_worker_provider_context.h" | 5 #include "content/child/service_worker/service_worker_provider_context.h" |
| 6 | 6 |
| 7 #include "base/thread_task_runner_handle.h" | 7 #include "base/thread_task_runner_handle.h" |
| 8 #include "content/child/child_thread_impl.h" | 8 #include "content/child/child_thread_impl.h" |
| 9 #include "content/child/service_worker/service_worker_dispatcher.h" | 9 #include "content/child/service_worker/service_worker_dispatcher.h" |
| 10 #include "content/child/service_worker/service_worker_handle_reference.h" | 10 #include "content/child/service_worker/service_worker_handle_reference.h" |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 ControllerDelegate() {} | 85 ControllerDelegate() {} |
| 86 ~ControllerDelegate() override {} | 86 ~ControllerDelegate() override {} |
| 87 | 87 |
| 88 void AssociateRegistration( | 88 void AssociateRegistration( |
| 89 scoped_ptr<ServiceWorkerRegistrationHandleReference> registration, | 89 scoped_ptr<ServiceWorkerRegistrationHandleReference> registration, |
| 90 scoped_ptr<ServiceWorkerHandleReference> installing, | 90 scoped_ptr<ServiceWorkerHandleReference> installing, |
| 91 scoped_ptr<ServiceWorkerHandleReference> waiting, | 91 scoped_ptr<ServiceWorkerHandleReference> waiting, |
| 92 scoped_ptr<ServiceWorkerHandleReference> active) override { | 92 scoped_ptr<ServiceWorkerHandleReference> active) override { |
| 93 DCHECK(!registration_); | 93 DCHECK(!registration_); |
| 94 registration_ = registration.Pass(); | 94 registration_ = registration.Pass(); |
| 95 installing_ = active.Pass(); | 95 installing_ = installing.Pass(); |
| 96 waiting_ = waiting.Pass(); | 96 waiting_ = waiting.Pass(); |
| 97 active_ = active.Pass(); | 97 active_ = active.Pass(); |
| 98 } | 98 } |
| 99 | 99 |
| 100 void DisassociateRegistration() override { | 100 void DisassociateRegistration() override { |
| 101 // ServiceWorkerGlobalScope is never disassociated. | 101 // ServiceWorkerGlobalScope is never disassociated. |
| 102 NOTREACHED(); | 102 NOTREACHED(); |
| 103 } | 103 } |
| 104 | 104 |
| 105 void SetController( | 105 void SetController( |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 | 202 |
| 203 void ServiceWorkerProviderContext::DestructOnMainThread() const { | 203 void ServiceWorkerProviderContext::DestructOnMainThread() const { |
| 204 if (!main_thread_task_runner_->RunsTasksOnCurrentThread() && | 204 if (!main_thread_task_runner_->RunsTasksOnCurrentThread() && |
| 205 main_thread_task_runner_->DeleteSoon(FROM_HERE, this)) { | 205 main_thread_task_runner_->DeleteSoon(FROM_HERE, this)) { |
| 206 return; | 206 return; |
| 207 } | 207 } |
| 208 delete this; | 208 delete this; |
| 209 } | 209 } |
| 210 | 210 |
| 211 } // namespace content | 211 } // namespace content |
| OLD | NEW |