| 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 886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 897 blink::WebServiceWorkerContextProxy::LastChanceOption web_last_chance = | 897 blink::WebServiceWorkerContextProxy::LastChanceOption web_last_chance = |
| 898 mojo::ConvertTo<blink::WebServiceWorkerContextProxy::LastChanceOption>( | 898 mojo::ConvertTo<blink::WebServiceWorkerContextProxy::LastChanceOption>( |
| 899 last_chance); | 899 last_chance); |
| 900 | 900 |
| 901 // TODO(jkarlin): Make this blink::WebString::FromUTF8Lenient once | 901 // TODO(jkarlin): Make this blink::WebString::FromUTF8Lenient once |
| 902 // https://crrev.com/1768063002/ lands. | 902 // https://crrev.com/1768063002/ lands. |
| 903 proxy_->dispatchSyncEvent(request_id, blink::WebString::fromUTF8(tag), | 903 proxy_->dispatchSyncEvent(request_id, blink::WebString::fromUTF8(tag), |
| 904 web_last_chance); | 904 web_last_chance); |
| 905 } | 905 } |
| 906 | 906 |
| 907 void ServiceWorkerContextClient::DispatchPaymentRequestEvent( |
| 908 payments::mojom::PaymentAppRequestDataPtr data, |
| 909 const DispatchPaymentRequestEventCallback& callback) { |
| 910 NOTIMPLEMENTED(); |
| 911 } |
| 912 |
| 907 void ServiceWorkerContextClient::Send(IPC::Message* message) { | 913 void ServiceWorkerContextClient::Send(IPC::Message* message) { |
| 908 sender_->Send(message); | 914 sender_->Send(message); |
| 909 } | 915 } |
| 910 | 916 |
| 911 void ServiceWorkerContextClient::SendWorkerStarted() { | 917 void ServiceWorkerContextClient::SendWorkerStarted() { |
| 912 DCHECK(worker_task_runner_->RunsTasksOnCurrentThread()); | 918 DCHECK(worker_task_runner_->RunsTasksOnCurrentThread()); |
| 913 TRACE_EVENT_ASYNC_END0("ServiceWorker", | 919 TRACE_EVENT_ASYNC_END0("ServiceWorker", |
| 914 "ServiceWorkerContextClient::StartingWorkerContext", | 920 "ServiceWorkerContextClient::StartingWorkerContext", |
| 915 this); | 921 this); |
| 916 Send(new EmbeddedWorkerHostMsg_WorkerStarted(embedded_worker_id_)); | 922 Send(new EmbeddedWorkerHostMsg_WorkerStarted(embedded_worker_id_)); |
| (...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1280 } | 1286 } |
| 1281 | 1287 |
| 1282 base::WeakPtr<ServiceWorkerContextClient> | 1288 base::WeakPtr<ServiceWorkerContextClient> |
| 1283 ServiceWorkerContextClient::GetWeakPtr() { | 1289 ServiceWorkerContextClient::GetWeakPtr() { |
| 1284 DCHECK(worker_task_runner_->RunsTasksOnCurrentThread()); | 1290 DCHECK(worker_task_runner_->RunsTasksOnCurrentThread()); |
| 1285 DCHECK(context_); | 1291 DCHECK(context_); |
| 1286 return context_->weak_factory.GetWeakPtr(); | 1292 return context_->weak_factory.GetWeakPtr(); |
| 1287 } | 1293 } |
| 1288 | 1294 |
| 1289 } // namespace content | 1295 } // namespace content |
| OLD | NEW |