OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 #ifndef WebGeofencingProvider_h |
| 6 #define WebGeofencingProvider_h |
| 7 |
| 8 #include "public/platform/WebCallbacks.h" |
| 9 #include "public/platform/WebVector.h" |
| 10 |
| 11 namespace blink { |
| 12 |
| 13 struct WebGeofencingError; |
| 14 class WebGeofencingRegion; |
| 15 class WebString; |
| 16 |
| 17 typedef WebCallbacks<WebGeofencingError, WebGeofencingError> WebGeofencingCallba
cks; |
| 18 typedef WebCallbacks<WebVector<WebGeofencingRegion>, WebGeofencingError> WebGeof
encingRegionsCallbacks; |
| 19 |
| 20 class WebGeofencingProvider { |
| 21 public: |
| 22 virtual ~WebGeofencingProvider() { } |
| 23 |
| 24 // Registers a region. The provider must always pass null to onSuccess. |
| 25 // Ownership of the WebGeofencingCallbacks is transferred to the client. |
| 26 // FIXME: celanup the callback type to not have a success type. |
| 27 virtual void registerRegion(const WebGeofencingRegion&, WebGeofencingCallbac
ks*) = 0; |
| 28 |
| 29 // Unregisters a region. The provider must always pass null to onSuccess. |
| 30 // Ownership of the WebGeofencingCallbacks is transferred to the client. |
| 31 // FIXME: celanup the callback type to not have a success type. |
| 32 virtual void unregisterRegion(const WebString& regionId, WebGeofencingCallba
cks*) = 0; |
| 33 |
| 34 // Returns all the currently registered regions. |
| 35 // Ownership of the WebGeofencingCallbacks is transferred to the client. |
| 36 virtual void getRegisteredRegions(WebGeofencingRegionsCallbacks*) = 0; |
| 37 }; |
| 38 |
| 39 } // namespace blink |
| 40 |
| 41 #endif // WebGeofencingProvider_h |
OLD | NEW |