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

Unified Diff: content/browser/geofencing/geofencing_dispatcher_host.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/browser/geofencing/geofencing_dispatcher_host.cc
diff --git a/content/browser/geofencing/geofencing_dispatcher_host.cc b/content/browser/geofencing/geofencing_dispatcher_host.cc
index 5cae1136bc98afa4b8ae41cf5b22c2669524781d..ef05d5a821ee602c89dba963b2c4ce8e26e84dad 100644
--- a/content/browser/geofencing/geofencing_dispatcher_host.cc
+++ b/content/browser/geofencing/geofencing_dispatcher_host.cc
@@ -32,6 +32,8 @@ bool GeofencingDispatcherHost::OnMessageReceived(const IPC::Message& message) {
IPC_MESSAGE_HANDLER(GeofencingHostMsg_UnregisterRegion, OnUnregisterRegion)
IPC_MESSAGE_HANDLER(GeofencingHostMsg_GetRegisteredRegions,
OnGetRegisteredRegions)
+ IPC_MESSAGE_HANDLER(GeofencingHostMsg_SetMockProvider, OnSetMockProvider)
+ IPC_MESSAGE_HANDLER(GeofencingHostMsg_SetMockPosition, OnSetMockPosition)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
return handled;
@@ -93,6 +95,20 @@ void GeofencingDispatcherHost::OnGetRegisteredRegions(
thread_id, request_id, status, result));
}
+void GeofencingDispatcherHost::OnSetMockProvider(
+ int64 service_worker_registration_id,
+ GeofencingMockState mock_state) {
+ manager_->SetMockProvider(service_worker_registration_id, mock_state);
+}
+
+void GeofencingDispatcherHost::OnSetMockPosition(
+ int64 service_worker_registration_id,
+ double latitude,
+ double longitude) {
+ manager_->SetMockPosition(service_worker_registration_id, latitude,
+ longitude);
+}
+
void GeofencingDispatcherHost::RegisterRegionCompleted(
int thread_id,
int request_id,

Powered by Google App Engine
This is Rietveld 408576698