Index: content/browser/geofencing/geofencing_manager.h |
diff --git a/content/browser/geofencing/geofencing_manager.h b/content/browser/geofencing/geofencing_manager.h |
index cae5edd3be778c975885070211c0fec0ed68e377..aec658a95372ee14fa8d011312d4f9c0f9230cfe 100644 |
--- a/content/browser/geofencing/geofencing_manager.h |
+++ b/content/browser/geofencing/geofencing_manager.h |
@@ -11,9 +11,12 @@ |
#include "base/callback_forward.h" |
#include "base/macros.h" |
+#include "base/memory/ref_counted.h" |
#include "base/memory/scoped_ptr.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/service_worker/service_worker_status_code.h" |
template <typename T> |
struct DefaultSingletonTraits; |
@@ -27,6 +30,8 @@ namespace content { |
class BrowserContext; |
class GeofencingProvider; |
+class ServiceWorkerContextWrapper; |
+class ServiceWorkerRegistration; |
// This is the main API to the geofencing subsystem. The application will hold |
// a single instance of this class. |
@@ -92,6 +97,10 @@ class CONTENT_EXPORT GeofencingManager { |
const GURL& service_worker_origin, |
std::map<std::string, blink::WebCircularGeofencingRegion>* regions); |
+ // To be called by GeofencingProvider |
+ void RegionEntered(int provider_id); |
+ void RegionExited(int provider_id); |
+ |
void SetProviderForTests(scoped_ptr<GeofencingProvider> provider); |
protected: |
@@ -126,6 +135,12 @@ class CONTENT_EXPORT GeofencingManager { |
// Clears a registration. |
void ClearRegistration(const RegistrationKey& key); |
+ // Finds a registration given the ID it is registered with by the provider. |
+ Registration* FindRegistrationByProviderId(int provider_id); |
+ |
+ void DispatchGeofencingEvent(blink::WebGeofencingEventType event_type, |
+ int provider_id); |
+ |
// List of all currently registered geofences. |
// TODO(mek): Better way of storing these that allows more efficient lookup |
// and deletion. |