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 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<void, WebGeofencingError> WebGeofencingCallbacks; | |
| 18 typedef WebCallbacks<WebVector<WebGeofencingRegion>, WebGeofencingError> WebGeof encingRegionsCallbacks; | |
|
abarth-chromium
2014/08/23 05:43:34
Why callbacks and not a virtual interface?
Marijn Kruisselbrink
2014/08/25 22:25:25
I'm not sure what kind of virtual interface you wo
| |
| 19 | |
| 20 class WebGeofencingProvider { | |
| 21 public: | |
| 22 virtual ~WebGeofencingProvider() { } | |
| 23 | |
| 24 // Registers a region. | |
| 25 // Ownership of the WebGeofencingCallbacks is transferred to the client. | |
| 26 virtual void registerRegion(const WebGeofencingRegion&, WebGeofencingCallbac ks*) = 0; | |
| 27 | |
| 28 // Unregisters a region. | |
| 29 // Ownership of the WebGeofencingCallbacks is transferred to the client. | |
| 30 virtual void unregisterRegion(const WebString& regionId, WebGeofencingCallba cks*) = 0; | |
| 31 | |
| 32 // Returns all the currently registered regions. | |
| 33 // Ownership of the WebGeofencingRegionsCallbacks is transferred to the clie nt. | |
| 34 virtual void getRegisteredRegions(WebGeofencingRegionsCallbacks*) = 0; | |
| 35 }; | |
| 36 | |
| 37 } // namespace blink | |
| 38 | |
| 39 #endif // WebGeofencingProvider_h | |
| OLD | NEW |