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 |