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 <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 IPC_MESSAGE_HANDLER(ServiceWorkerMsg_DidSkipWaiting, OnDidSkipWaiting) | 269 IPC_MESSAGE_HANDLER(ServiceWorkerMsg_DidSkipWaiting, OnDidSkipWaiting) |
270 IPC_MESSAGE_HANDLER(ServiceWorkerMsg_DidClaimClients, OnDidClaimClients) | 270 IPC_MESSAGE_HANDLER(ServiceWorkerMsg_DidClaimClients, OnDidClaimClients) |
271 IPC_MESSAGE_HANDLER(ServiceWorkerMsg_ClaimClientsError, OnClaimClientsError) | 271 IPC_MESSAGE_HANDLER(ServiceWorkerMsg_ClaimClientsError, OnClaimClientsError) |
272 IPC_MESSAGE_HANDLER(ServiceWorkerMsg_Ping, OnPing); | 272 IPC_MESSAGE_HANDLER(ServiceWorkerMsg_Ping, OnPing); |
273 IPC_MESSAGE_UNHANDLED(handled = false) | 273 IPC_MESSAGE_UNHANDLED(handled = false) |
274 IPC_END_MESSAGE_MAP() | 274 IPC_END_MESSAGE_MAP() |
275 DCHECK(handled); | 275 DCHECK(handled); |
276 } | 276 } |
277 | 277 |
278 void ServiceWorkerContextClient::BindServiceRegistry( | 278 void ServiceWorkerContextClient::BindServiceRegistry( |
279 mojo::shell::mojom::InterfaceProviderRequest services, | 279 shell::mojom::InterfaceProviderRequest services, |
280 mojo::shell::mojom::InterfaceProviderPtr exposed_services) { | 280 shell::mojom::InterfaceProviderPtr exposed_services) { |
281 context_->service_registry.Bind(std::move(services)); | 281 context_->service_registry.Bind(std::move(services)); |
282 context_->service_registry.BindRemoteServiceProvider( | 282 context_->service_registry.BindRemoteServiceProvider( |
283 std::move(exposed_services)); | 283 std::move(exposed_services)); |
284 } | 284 } |
285 | 285 |
286 blink::WebURL ServiceWorkerContextClient::scope() const { | 286 blink::WebURL ServiceWorkerContextClient::scope() const { |
287 return service_worker_scope_; | 287 return service_worker_scope_; |
288 } | 288 } |
289 | 289 |
290 void ServiceWorkerContextClient::getClient( | 290 void ServiceWorkerContextClient::getClient( |
(...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1045 } | 1045 } |
1046 | 1046 |
1047 base::WeakPtr<ServiceWorkerContextClient> | 1047 base::WeakPtr<ServiceWorkerContextClient> |
1048 ServiceWorkerContextClient::GetWeakPtr() { | 1048 ServiceWorkerContextClient::GetWeakPtr() { |
1049 DCHECK(worker_task_runner_->RunsTasksOnCurrentThread()); | 1049 DCHECK(worker_task_runner_->RunsTasksOnCurrentThread()); |
1050 DCHECK(context_); | 1050 DCHECK(context_); |
1051 return context_->weak_factory.GetWeakPtr(); | 1051 return context_->weak_factory.GetWeakPtr(); |
1052 } | 1052 } |
1053 | 1053 |
1054 } // namespace content | 1054 } // namespace content |
OLD | NEW |