| 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..a88fcdb7dfbc665e3cdefc6fea5ea892e2b97b05 100644
|
| --- a/content/child/geofencing/geofencing_dispatcher.cc
|
| +++ b/content/child/geofencing/geofencing_dispatcher.cc
|
| @@ -121,6 +121,41 @@ void GeofencingDispatcher::GetRegisteredRegions(
|
| CurrentWorkerId(), request_id, serviceworker_registration_id));
|
| }
|
|
|
| +void GeofencingDispatcher::SetMockProvider(
|
| + blink::WebServiceWorkerRegistration* service_worker_registration,
|
| + bool service_available) {
|
| + DCHECK(service_worker_registration);
|
| + int64 service_worker_registration_id =
|
| + static_cast<WebServiceWorkerRegistrationImpl*>(
|
| + service_worker_registration)->registration_id();
|
| + Send(new GeofencingHostMsg_SetMockProvider(
|
| + service_worker_registration_id,
|
| + service_available ? GeofencingMockState::SERVICE_AVAILABLE
|
| + : GeofencingMockState::SERVICE_UNAVAILABLE));
|
| +}
|
| +
|
| +void GeofencingDispatcher::ClearMockProvider(
|
| + blink::WebServiceWorkerRegistration* service_worker_registration) {
|
| + DCHECK(service_worker_registration);
|
| + int64 service_worker_registration_id =
|
| + static_cast<WebServiceWorkerRegistrationImpl*>(
|
| + service_worker_registration)->registration_id();
|
| + Send(new GeofencingHostMsg_SetMockProvider(service_worker_registration_id,
|
| + GeofencingMockState::NONE));
|
| +}
|
| +
|
| +void GeofencingDispatcher::SetMockPosition(
|
| + blink::WebServiceWorkerRegistration* service_worker_registration,
|
| + double latitude,
|
| + double longitude) {
|
| + DCHECK(service_worker_registration);
|
| + int64 service_worker_registration_id =
|
| + static_cast<WebServiceWorkerRegistrationImpl*>(
|
| + service_worker_registration)->registration_id();
|
| + Send(new GeofencingHostMsg_SetMockPosition(service_worker_registration_id,
|
| + latitude, longitude));
|
| +}
|
| +
|
| GeofencingDispatcher* GeofencingDispatcher::GetOrCreateThreadSpecificInstance(
|
| ThreadSafeSender* thread_safe_sender) {
|
| if (g_dispatcher_tls.Pointer()->Get() == kHasBeenDeleted) {
|
|
|