Chromium Code Reviews| 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 WebGeofencingClient_h | |
| 6 #define WebGeofencingClient_h | |
| 7 | |
| 8 #include "public/platform/WebCallbacks.h" | |
| 9 #include "public/platform/WebGeofencingError.h" | |
| 10 #include "public/platform/WebString.h" | |
| 11 #include "public/platform/WebVector.h" | |
| 12 | |
| 13 namespace blink { | |
| 14 | |
| 15 class WebGeofencingRegion; | |
| 16 class WebServiceWorkerProvider; | |
| 17 | |
| 18 typedef WebCallbacks<WebGeofencingError, WebGeofencingError> WebGeofencingCallba cks; | |
| 19 typedef WebCallbacks<WebVector<WebGeofencingRegion>, WebGeofencingError> WebGeof encingRegionsCallbacks; | |
| 20 | |
| 21 class WebGeofencingClient { | |
| 22 public: | |
| 23 virtual ~WebGeofencingClient() { } | |
| 24 | |
| 25 // Registers a region. The provider must always pass null to onSuccess. | |
| 26 // Ownership of the WebGeofencingCallbacks is transferred to the client. | |
| 27 // FIXME: somehow cleanup the callback type to not have a success type. | |
|
Peter Beverloo
2014/07/14 17:23:09
Has anyone filed a bug to track this? Resolving (o
| |
| 28 virtual void registerRegion(const WebGeofencingRegion&, WebGeofencingCallbac ks*, WebServiceWorkerProvider*) = 0; | |
| 29 | |
| 30 // Deregisters a region. The provider must always pass null to onSuccess. | |
| 31 // Ownership of the WebGeofencingCallbacks is transferred to the client. | |
| 32 // FIXME: somehow cleanup the callback type to not have a success type. | |
| 33 virtual void unregisterRegion(const WebString& regionId, WebGeofencingCallba cks*, WebServiceWorkerProvider*) = 0; | |
| 34 | |
| 35 // Returns all the currently registered regions. | |
| 36 // Ownership of the WebGeofencingRegionsCallbacks is transferred to the clie nt. | |
| 37 virtual void getRegisteredRegions(WebGeofencingRegionsCallbacks*, WebService WorkerProvider*) = 0; | |
| 38 }; | |
| 39 | |
| 40 } // namespace blink | |
| 41 | |
| 42 #endif // WebGeofencingClient_h | |
| OLD | NEW |