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

Unified Diff: public/platform/WebGeofencingProvider.h

Issue 464073002: Pass through geofencing API calls to the content layer. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
Index: public/platform/WebGeofencingProvider.h
diff --git a/public/platform/WebGeofencingProvider.h b/public/platform/WebGeofencingProvider.h
new file mode 100644
index 0000000000000000000000000000000000000000..bc2fd19353f332c9a86fc9dc8cdc48f6801835d7
--- /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;
+class WebGeofencingRegion;
+class WebString;
+
+typedef WebCallbacks<void, WebGeofencingError> WebGeofencingCallbacks;
+typedef WebCallbacks<WebVector<WebGeofencingRegion>, WebGeofencingError> WebGeofencingRegionsCallbacks;
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
+
+class WebGeofencingProvider {
+public:
+ virtual ~WebGeofencingProvider() { }
+
+ // Registers a region.
+ // Ownership of the WebGeofencingCallbacks is transferred to the client.
+ virtual void registerRegion(const WebGeofencingRegion&, WebGeofencingCallbacks*) = 0;
+
+ // 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

Powered by Google App Engine
This is Rietveld 408576698