Chromium Code Reviews| Index: public/platform/WebGeofencingProvider.h |
| diff --git a/public/platform/WebGeofencingProvider.h b/public/platform/WebGeofencingProvider.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..969b5d062fc730b574707dd6837abb05af00f2c4 |
| --- /dev/null |
| +++ b/public/platform/WebGeofencingProvider.h |
| @@ -0,0 +1,39 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef WebGeofencingProvider_h |
| +#define WebGeofencingProvider_h |
| + |
| +#include "public/platform/WebCallbacks.h" |
| +#include "public/platform/WebVector.h" |
| + |
| +namespace blink { |
| + |
| +struct WebGeofencingError; |
| +struct WebCircularGeofencingRegion; |
| +class WebString; |
| + |
| +typedef WebCallbacks<void, WebGeofencingError> WebGeofencingCallbacks; |
| +typedef WebCallbacks<WebVector<WebCircularGeofencingRegion>, WebGeofencingError> WebGeofencingRegionsCallbacks; |
| + |
| +class WebGeofencingProvider { |
| +public: |
| + virtual ~WebGeofencingProvider() { } |
| + |
| + // Registers a region. |
| + // Ownership of the WebGeofencingCallbacks is transferred to the client. |
| + virtual void registerRegion(const WebCircularGeofencingRegion&, WebGeofencingCallbacks*) = 0; |
|
jochen (gone - plz use gerrit)
2014/09/04 11:14:54
nit. add explicit ID parameter
|
| + |
| + // Unregisters a region. |
| + // Ownership of the WebGeofencingCallbacks is transferred to the client. |
| + virtual void unregisterRegion(const WebString& regionId, WebGeofencingCallbacks*) = 0; |
| + |
| + // Returns all the currently registered regions. |
| + // Ownership of the WebGeofencingRegionsCallbacks is transferred to the client. |
| + virtual void getRegisteredRegions(WebGeofencingRegionsCallbacks*) = 0; |
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif // WebGeofencingProvider_h |