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

Unified Diff: content/child/geofencing/geofencing_dispatcher.cc

Issue 701953007: Expose mock geofencing service via testRunner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mention unifying bug in a comment 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/geofencing_dispatcher.cc
diff --git a/content/child/geofencing/geofencing_dispatcher.cc b/content/child/geofencing/geofencing_dispatcher.cc
index eec721faf979eaa18d6a140a076231195bb7f35d..8d64fa012715230218ec25c0e7446763a5752d5f 100644
--- a/content/child/geofencing/geofencing_dispatcher.cc
+++ b/content/child/geofencing/geofencing_dispatcher.cc
@@ -121,6 +121,20 @@ void GeofencingDispatcher::GetRegisteredRegions(
CurrentWorkerId(), request_id, serviceworker_registration_id));
}
+void GeofencingDispatcher::SetMockProvider(bool service_available) {
+ Send(new GeofencingHostMsg_SetMockProvider(
+ service_available ? GeofencingMockState::SERVICE_AVAILABLE
+ : GeofencingMockState::SERVICE_UNAVAILABLE));
+}
+
+void GeofencingDispatcher::ClearMockProvider() {
+ Send(new GeofencingHostMsg_SetMockProvider(GeofencingMockState::NONE));
+}
+
+void GeofencingDispatcher::SetMockPosition(double latitude, double longitude) {
+ Send(new GeofencingHostMsg_SetMockPosition(latitude, longitude));
+}
+
GeofencingDispatcher* GeofencingDispatcher::GetOrCreateThreadSpecificInstance(
ThreadSafeSender* thread_safe_sender) {
if (g_dispatcher_tls.Pointer()->Get() == kHasBeenDeleted) {
« no previous file with comments | « content/child/geofencing/geofencing_dispatcher.h ('k') | content/child/geofencing/web_geofencing_provider_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698