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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: content/child/geofencing/web_geofencing_provider_impl.cc
diff --git a/content/child/geofencing/web_geofencing_provider_impl.cc b/content/child/geofencing/web_geofencing_provider_impl.cc
index 5d78b9810b805d8f9ebb830ae7d131e55ab8322a..3d89d93a689d4b3afe97fa922a1d88b06aac439d 100644
--- a/content/child/geofencing/web_geofencing_provider_impl.cc
+++ b/content/child/geofencing/web_geofencing_provider_impl.cc
@@ -40,6 +40,26 @@ void WebGeofencingProviderImpl::getRegisteredRegions(
GetDispatcher()->GetRegisteredRegions(service_worker_registration, callbacks);
}
+void WebGeofencingProviderImpl::setMockProvider(
+ blink::WebServiceWorkerRegistration* service_worker_registration,
+ bool service_available) {
+ GetDispatcher()->SetMockProvider(service_worker_registration,
+ service_available);
+}
+
+void WebGeofencingProviderImpl::clearMockProvider(
+ blink::WebServiceWorkerRegistration* service_worker_registration) {
+ GetDispatcher()->ClearMockProvider(service_worker_registration);
+}
+
+void WebGeofencingProviderImpl::setMockPosition(
+ blink::WebServiceWorkerRegistration* service_worker_registration,
+ double latitude,
+ double longitude) {
+ GetDispatcher()->SetMockPosition(service_worker_registration, latitude,
+ longitude);
+}
+
GeofencingDispatcher* WebGeofencingProviderImpl::GetDispatcher() {
return GeofencingDispatcher::GetOrCreateThreadSpecificInstance(
thread_safe_sender_.get());

Powered by Google App Engine
This is Rietveld 408576698