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

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

Issue 701953007: Expose mock geofencing service via testRunner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 {
(...skipping 22 matching lines...) Expand all
33 GetDispatcher()->UnregisterRegion( 33 GetDispatcher()->UnregisterRegion(
34 regionId, service_worker_registration, callbacks); 34 regionId, service_worker_registration, callbacks);
35 } 35 }
36 36
37 void WebGeofencingProviderImpl::getRegisteredRegions( 37 void WebGeofencingProviderImpl::getRegisteredRegions(
38 blink::WebServiceWorkerRegistration* service_worker_registration, 38 blink::WebServiceWorkerRegistration* service_worker_registration,
39 blink::WebGeofencingRegionsCallbacks* callbacks) { 39 blink::WebGeofencingRegionsCallbacks* callbacks) {
40 GetDispatcher()->GetRegisteredRegions(service_worker_registration, callbacks); 40 GetDispatcher()->GetRegisteredRegions(service_worker_registration, callbacks);
41 } 41 }
42 42
43 void WebGeofencingProviderImpl::setMockProvider(
44 blink::WebServiceWorkerRegistration* service_worker_registration,
45 bool service_available) {
46 GetDispatcher()->SetMockProvider(service_worker_registration,
47 service_available);
48 }
49
50 void WebGeofencingProviderImpl::clearMockProvider(
51 blink::WebServiceWorkerRegistration* service_worker_registration) {
52 GetDispatcher()->ClearMockProvider(service_worker_registration);
53 }
54
55 void WebGeofencingProviderImpl::setMockPosition(
56 blink::WebServiceWorkerRegistration* service_worker_registration,
57 double latitude,
58 double longitude) {
59 GetDispatcher()->SetMockPosition(service_worker_registration, latitude,
60 longitude);
61 }
62
43 GeofencingDispatcher* WebGeofencingProviderImpl::GetDispatcher() { 63 GeofencingDispatcher* WebGeofencingProviderImpl::GetDispatcher() {
44 return GeofencingDispatcher::GetOrCreateThreadSpecificInstance( 64 return GeofencingDispatcher::GetOrCreateThreadSpecificInstance(
45 thread_safe_sender_.get()); 65 thread_safe_sender_.get());
46 } 66 }
47 67
48 } // namespace content 68 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698