1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef WebGeofencingProvider_h
6 #define WebGeofencingProvider_h
8 #include "public/platform/WebCallbacks.h"
9 #include "public/platform/WebVector.h"
13 struct WebCircularGeofencingRegion;
14 struct WebGeofencingError;
15 struct WebGeofencingRegistration;
16 class WebServiceWorkerRegistration;
19 typedef WebCallbacks<void, WebGeofencingError> WebGeofencingCallbacks;
20 typedef WebCallbacks<WebVector<WebGeofencingRegistration>, WebGeofencingError> WebGeofencingRegionsCallbacks;
22 class WebGeofencingProvider {
24 virtual ~WebGeofencingProvider() { }
26 // Registers a region.
27 // Ownership of the WebGeofencingCallbacks is transferred to the client.
28 virtual void registerRegion(const WebString& regionId, const WebCircularGeofencingRegion&, WebServiceWorkerRegistration*, WebGeofencingCallbacks*) { }
30 // Unregisters a region.
31 // Ownership of the WebGeofencingCallbacks is transferred to the client.
32 virtual void unregisterRegion(const WebString& regionId, WebServiceWorkerRegistration*, WebGeofencingCallbacks*) { }
34 // Returns all the currently registered regions.
35 // Ownership of the WebGeofencingRegionsCallbacks is transferred to the client.
36 virtual void getRegisteredRegions(WebServiceWorkerRegistration*, WebGeofencingRegionsCallbacks*) { }
41 #endif // WebGeofencingProvider_h