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

Unified Diff: Source/modules/geofencing/Geofencing.h

Issue 401713005: Move all geofencing code into its own module separate from geolocation. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: address comments 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: Source/modules/geofencing/Geofencing.h
diff --git a/Source/modules/geofencing/Geofencing.h b/Source/modules/geofencing/Geofencing.h
new file mode 100644
index 0000000000000000000000000000000000000000..902838b69b5fce3f1b009caa0383baf7c4469cf1
--- /dev/null
+++ b/Source/modules/geofencing/Geofencing.h
@@ -0,0 +1,39 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
Michael van Ouwerkerk 2014/08/06 17:10:43 Why does this file show as a new add instead of a
Marijn Kruisselbrink 2014/08/06 18:27:18 Because this is a new file? But okay, it does make
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef Geofencing_h
+#define Geofencing_h
+
+#include "bindings/core/v8/ScriptWrappable.h"
+#include "platform/heap/Handle.h"
+#include "wtf/text/WTFString.h"
+
+namespace blink {
+
+class ExecutionContext;
+class GeofencingRegion;
+class ScriptPromise;
+class ScriptState;
+
+class Geofencing FINAL : public GarbageCollectedFinalized<Geofencing>, public ScriptWrappable {
Michael van Ouwerkerk 2014/08/06 17:10:43 FYI: ScriptWrappable will soon no longer require a
Marijn Kruisselbrink 2014/08/06 18:27:18 Acknowledged.
+public:
+ static Geofencing* create()
+ {
+ return new Geofencing();
+ }
+ virtual ~Geofencing();
+
+ ScriptPromise registerRegion(ScriptState*, GeofencingRegion*);
+ ScriptPromise unregisterRegion(ScriptState*, const String& regionId);
+ ScriptPromise getRegisteredRegions(ScriptState*) const;
+
+ virtual void trace(Visitor*) { }
+
+private:
+ Geofencing();
+};
+
+} // namespace blink
+
+#endif // Geofencing_h

Powered by Google App Engine
This is Rietveld 408576698