Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(515)

Side by Side Diff: content/child/background_sync/background_sync_provider.cc

Issue 2079943002: Change RenderFrame to use InterfaceRegistry et al. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@a2
Patch Set: . Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/child/BUILD.gn ('k') | content/child/blink_platform_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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>
(...skipping 16 matching lines...) Expand all
27 27
28 // Returns the id of the given |service_worker_registration|, which 28 // Returns the id of the given |service_worker_registration|, which
29 // is only available on the implementation of the interface. 29 // is only available on the implementation of the interface.
30 int64_t GetServiceWorkerRegistrationId( 30 int64_t GetServiceWorkerRegistrationId(
31 blink::WebServiceWorkerRegistration* service_worker_registration) { 31 blink::WebServiceWorkerRegistration* service_worker_registration) {
32 return static_cast<WebServiceWorkerRegistrationImpl*>( 32 return static_cast<WebServiceWorkerRegistrationImpl*>(
33 service_worker_registration)->registration_id(); 33 service_worker_registration)->registration_id();
34 } 34 }
35 35
36 void ConnectToServiceOnMainThread( 36 void ConnectToServiceOnMainThread(
37 mojo::InterfaceRequest<blink::mojom::BackgroundSyncService> request) { 37 blink::mojom::BackgroundSyncServiceRequest request) {
38 DCHECK(ChildThreadImpl::current()); 38 DCHECK(ChildThreadImpl::current());
39 ChildThreadImpl::current()->service_registry()->ConnectToRemoteService( 39 ChildThreadImpl::current()->remote_interfaces()->GetInterface(
40 std::move(request)); 40 std::move(request));
41 } 41 }
42 42
43 LazyInstance<ThreadLocalPointer<BackgroundSyncProvider>>::Leaky 43 LazyInstance<ThreadLocalPointer<BackgroundSyncProvider>>::Leaky
44 g_sync_provider_tls = LAZY_INSTANCE_INITIALIZER; 44 g_sync_provider_tls = LAZY_INSTANCE_INITIALIZER;
45 45
46 } // namespace 46 } // namespace
47 47
48 BackgroundSyncProvider::BackgroundSyncProvider( 48 BackgroundSyncProvider::BackgroundSyncProvider(
49 const scoped_refptr<base::SingleThreadTaskRunner> main_task_runner) 49 const scoped_refptr<base::SingleThreadTaskRunner> main_task_runner)
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 mojo::InterfaceRequest<blink::mojom::BackgroundSyncService> request = 212 mojo::InterfaceRequest<blink::mojom::BackgroundSyncService> request =
213 mojo::GetProxy(&background_sync_service_); 213 mojo::GetProxy(&background_sync_service_);
214 main_thread_task_runner_->PostTask( 214 main_thread_task_runner_->PostTask(
215 FROM_HERE, 215 FROM_HERE,
216 base::Bind(&ConnectToServiceOnMainThread, base::Passed(&request))); 216 base::Bind(&ConnectToServiceOnMainThread, base::Passed(&request)));
217 } 217 }
218 return background_sync_service_; 218 return background_sync_service_;
219 } 219 }
220 220
221 } // namespace content 221 } // namespace content
OLDNEW
« no previous file with comments | « content/child/BUILD.gn ('k') | content/child/blink_platform_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698