Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(550)

Side by Side Diff: public/platform/WebGeofencingProvider.h

Issue 468913007: Add support for CallbackPromiseAdapter<void, T> matching WebCallbacks<void, T>. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@geofencing5
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WebGeofencingProvider_h 5 #ifndef WebGeofencingProvider_h
6 #define WebGeofencingProvider_h 6 #define WebGeofencingProvider_h
7 7
8 #include "public/platform/WebCallbacks.h" 8 #include "public/platform/WebCallbacks.h"
9 #include "public/platform/WebVector.h" 9 #include "public/platform/WebVector.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 struct WebGeofencingError; 13 struct WebGeofencingError;
14 class WebGeofencingRegion; 14 class WebGeofencingRegion;
15 class WebString; 15 class WebString;
16 16
17 typedef WebCallbacks<WebGeofencingError, WebGeofencingError> WebGeofencingCallba cks; 17 typedef WebCallbacks<void, WebGeofencingError> WebGeofencingCallbacks;
18 typedef WebCallbacks<WebVector<WebGeofencingRegion>, WebGeofencingError> WebGeof encingRegionsCallbacks; 18 typedef WebCallbacks<WebVector<WebGeofencingRegion>, WebGeofencingError> WebGeof encingRegionsCallbacks;
19 19
20 class WebGeofencingProvider { 20 class WebGeofencingProvider {
21 public: 21 public:
22 virtual ~WebGeofencingProvider() { } 22 virtual ~WebGeofencingProvider() { }
23 23
24 // Registers a region. The provider must always pass null to onSuccess. 24 // Registers a region.
25 // Ownership of the WebGeofencingCallbacks is transferred to the client. 25 // Ownership of the WebGeofencingCallbacks is transferred to the client.
26 // FIXME: cleanup the callback type to not have a success type.
27 virtual void registerRegion(const WebGeofencingRegion&, WebGeofencingCallbac ks*) = 0; 26 virtual void registerRegion(const WebGeofencingRegion&, WebGeofencingCallbac ks*) = 0;
28 27
29 // Unregisters a region. The provider must always pass null to onSuccess. 28 // Unregisters a region.
30 // Ownership of the WebGeofencingCallbacks is transferred to the client. 29 // Ownership of the WebGeofencingCallbacks is transferred to the client.
31 // FIXME: cleanup the callback type to not have a success type.
32 virtual void unregisterRegion(const WebString& regionId, WebGeofencingCallba cks*) = 0; 30 virtual void unregisterRegion(const WebString& regionId, WebGeofencingCallba cks*) = 0;
33 31
34 // Returns all the currently registered regions. 32 // Returns all the currently registered regions.
35 // Ownership of the WebGeofencingCallbacks is transferred to the client. 33 // Ownership of the WebGeofencingCallbacks is transferred to the client.
36 virtual void getRegisteredRegions(WebGeofencingRegionsCallbacks*) = 0; 34 virtual void getRegisteredRegions(WebGeofencingRegionsCallbacks*) = 0;
37 }; 35 };
38 36
39 } // namespace blink 37 } // namespace blink
40 38
41 #endif // WebGeofencingProvider_h 39 #endif // WebGeofencingProvider_h
OLDNEW
« Source/modules/geofencing/Geofencing.cpp ('K') | « Source/modules/geofencing/Geofencing.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698