| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/service_worker_context_client.h" | 5 #include "content/renderer/service_worker/service_worker_context_client.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 IPC_MESSAGE_HANDLER(ServiceWorkerMsg_DidSkipWaiting, OnDidSkipWaiting) | 279 IPC_MESSAGE_HANDLER(ServiceWorkerMsg_DidSkipWaiting, OnDidSkipWaiting) |
| 280 IPC_MESSAGE_HANDLER(ServiceWorkerMsg_DidClaimClients, OnDidClaimClients) | 280 IPC_MESSAGE_HANDLER(ServiceWorkerMsg_DidClaimClients, OnDidClaimClients) |
| 281 IPC_MESSAGE_HANDLER(ServiceWorkerMsg_ClaimClientsError, OnClaimClientsError) | 281 IPC_MESSAGE_HANDLER(ServiceWorkerMsg_ClaimClientsError, OnClaimClientsError) |
| 282 IPC_MESSAGE_HANDLER(ServiceWorkerMsg_Ping, OnPing); | 282 IPC_MESSAGE_HANDLER(ServiceWorkerMsg_Ping, OnPing); |
| 283 IPC_MESSAGE_UNHANDLED(handled = false) | 283 IPC_MESSAGE_UNHANDLED(handled = false) |
| 284 IPC_END_MESSAGE_MAP() | 284 IPC_END_MESSAGE_MAP() |
| 285 DCHECK(handled); | 285 DCHECK(handled); |
| 286 } | 286 } |
| 287 | 287 |
| 288 void ServiceWorkerContextClient::BindServiceRegistry( | 288 void ServiceWorkerContextClient::BindServiceRegistry( |
| 289 mojo::InterfaceRequest<mojo::ServiceProvider> services, | 289 mojo::InterfaceRequest<mojo::InterfaceProvider> services, |
| 290 mojo::ServiceProviderPtr exposed_services) { | 290 mojo::InterfaceProviderPtr exposed_services) { |
| 291 context_->service_registry.Bind(std::move(services)); | 291 context_->service_registry.Bind(std::move(services)); |
| 292 context_->service_registry.BindRemoteServiceProvider( | 292 context_->service_registry.BindRemoteServiceProvider( |
| 293 std::move(exposed_services)); | 293 std::move(exposed_services)); |
| 294 } | 294 } |
| 295 | 295 |
| 296 blink::WebURL ServiceWorkerContextClient::scope() const { | 296 blink::WebURL ServiceWorkerContextClient::scope() const { |
| 297 return service_worker_scope_; | 297 return service_worker_scope_; |
| 298 } | 298 } |
| 299 | 299 |
| 300 void ServiceWorkerContextClient::getClients( | 300 void ServiceWorkerContextClient::getClients( |
| (...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1037 } | 1037 } |
| 1038 | 1038 |
| 1039 base::WeakPtr<ServiceWorkerContextClient> | 1039 base::WeakPtr<ServiceWorkerContextClient> |
| 1040 ServiceWorkerContextClient::GetWeakPtr() { | 1040 ServiceWorkerContextClient::GetWeakPtr() { |
| 1041 DCHECK(worker_task_runner_->RunsTasksOnCurrentThread()); | 1041 DCHECK(worker_task_runner_->RunsTasksOnCurrentThread()); |
| 1042 DCHECK(context_); | 1042 DCHECK(context_); |
| 1043 return context_->weak_factory.GetWeakPtr(); | 1043 return context_->weak_factory.GetWeakPtr(); |
| 1044 } | 1044 } |
| 1045 | 1045 |
| 1046 } // namespace content | 1046 } // namespace content |
| OLD | NEW |