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

Unified Diff: public/platform/WebGeofencingClient.h

Issue 393533002: Pass through the geofencing API calls to the content layer. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@geofencing2
Patch Set: Created 6 years, 5 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/WebGeofencingClient.h
diff --git a/public/platform/WebGeofencingClient.h b/public/platform/WebGeofencingClient.h
new file mode 100644
index 0000000000000000000000000000000000000000..bce99928c431b4db4157130df255e5cccb416d16
--- /dev/null
+++ b/public/platform/WebGeofencingClient.h
@@ -0,0 +1,42 @@
+// 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 WebGeofencingClient_h
+#define WebGeofencingClient_h
+
+#include "public/platform/WebCallbacks.h"
+#include "public/platform/WebGeofencingError.h"
+#include "public/platform/WebString.h"
+#include "public/platform/WebVector.h"
+
+namespace blink {
+
+class WebGeofencingRegion;
+class WebServiceWorkerProvider;
+
+typedef WebCallbacks<WebGeofencingError, WebGeofencingError> WebGeofencingCallbacks;
+typedef WebCallbacks<WebVector<WebGeofencingRegion>, WebGeofencingError> WebGeofencingRegionsCallbacks;
+
+class WebGeofencingClient {
+public:
+ virtual ~WebGeofencingClient() { }
+
+ // Registers a region. The provider must always pass null to onSuccess.
+ // Ownership of the WebGeofencingCallbacks is transferred to the client.
+ // 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
+ virtual void registerRegion(const WebGeofencingRegion&, WebGeofencingCallbacks*, WebServiceWorkerProvider*) = 0;
+
+ // Deregisters a region. The provider must always pass null to onSuccess.
+ // Ownership of the WebGeofencingCallbacks is transferred to the client.
+ // FIXME: somehow cleanup the callback type to not have a success type.
+ virtual void unregisterRegion(const WebString& regionId, WebGeofencingCallbacks*, WebServiceWorkerProvider*) = 0;
+
+ // Returns all the currently registered regions.
+ // Ownership of the WebGeofencingRegionsCallbacks is transferred to the client.
+ virtual void getRegisteredRegions(WebGeofencingRegionsCallbacks*, WebServiceWorkerProvider*) = 0;
+};
+
+} // namespace blink
+
+#endif // WebGeofencingClient_h

Powered by Google App Engine
This is Rietveld 408576698