| 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 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 Send(new ServiceWorkerHostMsg_FetchEventFinished( | 514 Send(new ServiceWorkerHostMsg_FetchEventFinished( |
| 515 GetRoutingID(), request_id, | 515 GetRoutingID(), request_id, |
| 516 SERVICE_WORKER_FETCH_EVENT_RESULT_RESPONSE, | 516 SERVICE_WORKER_FETCH_EVENT_RESULT_RESPONSE, |
| 517 response)); | 517 response)); |
| 518 } | 518 } |
| 519 | 519 |
| 520 void ServiceWorkerContextClient::didHandleNotificationClickEvent( | 520 void ServiceWorkerContextClient::didHandleNotificationClickEvent( |
| 521 int request_id, | 521 int request_id, |
| 522 blink::WebServiceWorkerEventResult result) { | 522 blink::WebServiceWorkerEventResult result) { |
| 523 Send(new ServiceWorkerHostMsg_NotificationClickEventFinished( | 523 Send(new ServiceWorkerHostMsg_NotificationClickEventFinished( |
| 524 GetRoutingID(), request_id)); | 524 GetRoutingID(), request_id, result)); |
| 525 } | 525 } |
| 526 | 526 |
| 527 void ServiceWorkerContextClient::didHandlePushEvent( | 527 void ServiceWorkerContextClient::didHandlePushEvent( |
| 528 int request_id, | 528 int request_id, |
| 529 blink::WebServiceWorkerEventResult result) { | 529 blink::WebServiceWorkerEventResult result) { |
| 530 Send(new ServiceWorkerHostMsg_PushEventFinished( | 530 Send(new ServiceWorkerHostMsg_PushEventFinished( |
| 531 GetRoutingID(), request_id, result)); | 531 GetRoutingID(), request_id, result)); |
| 532 } | 532 } |
| 533 | 533 |
| 534 void ServiceWorkerContextClient::didHandleSyncEvent( | 534 void ServiceWorkerContextClient::didHandleSyncEvent( |
| (...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 986 } | 986 } |
| 987 | 987 |
| 988 base::WeakPtr<ServiceWorkerContextClient> | 988 base::WeakPtr<ServiceWorkerContextClient> |
| 989 ServiceWorkerContextClient::GetWeakPtr() { | 989 ServiceWorkerContextClient::GetWeakPtr() { |
| 990 DCHECK(worker_task_runner_->RunsTasksOnCurrentThread()); | 990 DCHECK(worker_task_runner_->RunsTasksOnCurrentThread()); |
| 991 DCHECK(context_); | 991 DCHECK(context_); |
| 992 return context_->weak_factory.GetWeakPtr(); | 992 return context_->weak_factory.GetWeakPtr(); |
| 993 } | 993 } |
| 994 | 994 |
| 995 } // namespace content | 995 } // namespace content |
| OLD | NEW |