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

Unified Diff: content/browser/geofencing/geofencing_manager.h

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/browser/geofencing/geofencing_manager.h
diff --git a/content/browser/geofencing/geofencing_manager.h b/content/browser/geofencing/geofencing_manager.h
index 29c52e4830b92d6e7f6670545ac9429778ca4b44..590b3f3d4470122920890105be1d95785a1094c9 100644
--- a/content/browser/geofencing/geofencing_manager.h
+++ b/content/browser/geofencing/geofencing_manager.h
@@ -16,7 +16,7 @@
#include "content/browser/geofencing/geofencing_registration_delegate.h"
#include "content/browser/service_worker/service_worker_storage.h"
#include "content/common/content_export.h"
-#include "content/common/geofencing_status.h"
+#include "content/common/geofencing_types.h"
#include "content/common/service_worker/service_worker_status_code.h"
template <typename T>
@@ -30,6 +30,7 @@ struct WebCircularGeofencingRegion;
namespace content {
class GeofencingService;
+class MockGeofencingService;
class ServiceWorkerContextWrapper;
class ServiceWorkerRegistration;
@@ -89,6 +90,14 @@ class CONTENT_EXPORT GeofencingManager
int64 service_worker_registration_id,
std::map<std::string, blink::WebCircularGeofencingRegion>* result);
+ // Enables or disables mock geofencing service.
+ void SetMockProvider(GeofencingMockState mock_state);
+
+ // Set the mock geofencing position.
+ // TODO(mek): Unify this mock position with the devtools exposed geolocation
+ // mock position (http://crbug.com/440902).
+ void SetMockPosition(double latitude, double longitude);
+
void SetServiceForTesting(GeofencingService* service) {
service_ = service;
}
@@ -169,6 +178,7 @@ class CONTENT_EXPORT GeofencingManager
RegistrationIdRegistrationMap registrations_by_id_;
GeofencingService* service_;
+ scoped_ptr<MockGeofencingService> mock_service_;
scoped_refptr<ServiceWorkerContextWrapper> service_worker_context_;
DISALLOW_COPY_AND_ASSIGN(GeofencingManager);
« no previous file with comments | « content/browser/geofencing/geofencing_dispatcher_host.cc ('k') | content/browser/geofencing/geofencing_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698