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/child/background_sync/background_sync_provider.h" | 5 #include "content/child/background_sync/background_sync_provider.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <utility> | 10 #include <utility> |
11 | 11 |
12 #include "base/bind.h" | 12 #include "base/bind.h" |
13 #include "base/lazy_instance.h" | 13 #include "base/lazy_instance.h" |
14 #include "base/single_thread_task_runner.h" | 14 #include "base/single_thread_task_runner.h" |
15 #include "base/threading/thread_local.h" | 15 #include "base/threading/thread_local.h" |
16 #include "content/child/background_sync/background_sync_type_converters.h" | 16 #include "content/child/background_sync/background_sync_type_converters.h" |
17 #include "content/child/child_thread_impl.h" | 17 #include "content/child/child_thread_impl.h" |
18 #include "content/child/service_worker/web_service_worker_registration_impl.h" | 18 #include "content/child/service_worker/web_service_worker_registration_impl.h" |
19 #include "services/shell/public/cpp/interface_provider.h" | 19 #include "services/service_manager/public/cpp/interface_provider.h" |
20 #include "third_party/WebKit/public/platform/modules/background_sync/WebSyncErro
r.h" | 20 #include "third_party/WebKit/public/platform/modules/background_sync/WebSyncErro
r.h" |
21 #include "third_party/WebKit/public/platform/modules/background_sync/WebSyncRegi
stration.h" | 21 #include "third_party/WebKit/public/platform/modules/background_sync/WebSyncRegi
stration.h" |
22 | 22 |
23 using base::LazyInstance; | 23 using base::LazyInstance; |
24 using base::ThreadLocalPointer; | 24 using base::ThreadLocalPointer; |
25 | 25 |
26 namespace content { | 26 namespace content { |
27 namespace { | 27 namespace { |
28 | 28 |
29 // Returns the id of the given |service_worker_registration|, which | 29 // Returns the id of the given |service_worker_registration|, which |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 mojo::InterfaceRequest<blink::mojom::BackgroundSyncService> request = | 213 mojo::InterfaceRequest<blink::mojom::BackgroundSyncService> request = |
214 mojo::GetProxy(&background_sync_service_); | 214 mojo::GetProxy(&background_sync_service_); |
215 main_thread_task_runner_->PostTask( | 215 main_thread_task_runner_->PostTask( |
216 FROM_HERE, | 216 FROM_HERE, |
217 base::Bind(&ConnectToServiceOnMainThread, base::Passed(&request))); | 217 base::Bind(&ConnectToServiceOnMainThread, base::Passed(&request))); |
218 } | 218 } |
219 return background_sync_service_; | 219 return background_sync_service_; |
220 } | 220 } |
221 | 221 |
222 } // namespace content | 222 } // namespace content |
OLD | NEW |