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

Side by Side Diff: content/child/geofencing/web_geofencing_provider_impl.cc

Issue 623823002: Chrome side of passing on the service worker registration with geofencing API calls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 1 month 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/geofencing/web_geofencing_provider_impl.h" 5 #include "content/child/geofencing/web_geofencing_provider_impl.h"
6 6
7 #include "content/child/geofencing/geofencing_dispatcher.h" 7 #include "content/child/geofencing/geofencing_dispatcher.h"
8 #include "content/child/thread_safe_sender.h" 8 #include "content/child/thread_safe_sender.h"
9 9
10 namespace content { 10 namespace content {
11 11
12 WebGeofencingProviderImpl::WebGeofencingProviderImpl( 12 WebGeofencingProviderImpl::WebGeofencingProviderImpl(
13 ThreadSafeSender* thread_safe_sender) 13 ThreadSafeSender* thread_safe_sender)
14 : thread_safe_sender_(thread_safe_sender) { 14 : thread_safe_sender_(thread_safe_sender) {
15 } 15 }
16 16
17 WebGeofencingProviderImpl::~WebGeofencingProviderImpl() { 17 WebGeofencingProviderImpl::~WebGeofencingProviderImpl() {
18 } 18 }
19 19
20 void WebGeofencingProviderImpl::registerRegion( 20 void WebGeofencingProviderImpl::registerRegion(
21 const blink::WebString& regionId, 21 const blink::WebString& regionId,
22 const blink::WebCircularGeofencingRegion& region, 22 const blink::WebCircularGeofencingRegion& region,
23 blink::WebServiceWorkerRegistration* service_worker_registration,
23 blink::WebGeofencingCallbacks* callbacks) { 24 blink::WebGeofencingCallbacks* callbacks) {
24 GetDispatcher()->RegisterRegion(regionId, region, callbacks); 25 GetDispatcher()->RegisterRegion(
26 regionId, region, service_worker_registration, callbacks);
25 } 27 }
26 28
27 void WebGeofencingProviderImpl::unregisterRegion( 29 void WebGeofencingProviderImpl::unregisterRegion(
28 const blink::WebString& regionId, 30 const blink::WebString& regionId,
31 blink::WebServiceWorkerRegistration* service_worker_registration,
29 blink::WebGeofencingCallbacks* callbacks) { 32 blink::WebGeofencingCallbacks* callbacks) {
30 GetDispatcher()->UnregisterRegion(regionId, callbacks); 33 GetDispatcher()->UnregisterRegion(
34 regionId, service_worker_registration, callbacks);
31 } 35 }
32 36
33 void WebGeofencingProviderImpl::getRegisteredRegions( 37 void WebGeofencingProviderImpl::getRegisteredRegions(
38 blink::WebServiceWorkerRegistration* service_worker_registration,
34 blink::WebGeofencingRegionsCallbacks* callbacks) { 39 blink::WebGeofencingRegionsCallbacks* callbacks) {
35 GetDispatcher()->GetRegisteredRegions(callbacks); 40 GetDispatcher()->GetRegisteredRegions(service_worker_registration, callbacks);
36 } 41 }
37 42
38 GeofencingDispatcher* WebGeofencingProviderImpl::GetDispatcher() { 43 GeofencingDispatcher* WebGeofencingProviderImpl::GetDispatcher() {
39 return GeofencingDispatcher::GetOrCreateThreadSpecificInstance( 44 return GeofencingDispatcher::GetOrCreateThreadSpecificInstance(
40 thread_safe_sender_.get()); 45 thread_safe_sender_.get());
41 } 46 }
42 47
43 } // namespace content 48 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698