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

Unified Diff: Source/modules/geolocation/GeofencingRegion.h

Issue 375353002: Add the first very basic bits of a geofencing API. (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/geolocation/GeofencingRegion.h
diff --git a/Source/modules/geolocation/GeofencingRegion.h b/Source/modules/geolocation/GeofencingRegion.h
new file mode 100644
index 0000000000000000000000000000000000000000..f6dc460b4c00fe3263c7a36a322da57b41d2a708
--- /dev/null
+++ b/Source/modules/geolocation/GeofencingRegion.h
@@ -0,0 +1,37 @@
+// 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 GeofencingRegion_h
+#define GeofencingRegion_h
+
+#include "bindings/core/v8/ScriptWrappable.h"
+#include "platform/heap/Handle.h"
+#include "wtf/text/WTFString.h"
+
+namespace WebCore {
+
+class GeofencingRegion : public GarbageCollectedFinalized<GeofencingRegion>, public ScriptWrappable {
Peter Beverloo 2014/07/10 13:17:28 Use GarbageCollected, since you don't have a destr
Marijn Kruisselbrink 2014/07/10 15:11:01 That's what I had in PS1, it didn't compile with:
Peter Beverloo 2014/07/10 16:31:36 Aah, the String destructor. Indeed, but please jus
Marijn Kruisselbrink 2014/07/11 10:06:39 Done.
+ WTF_MAKE_NONCOPYABLE(GeofencingRegion);
+public:
+ void trace(Visitor*) { }
Peter Beverloo 2014/07/10 13:17:28 virtual void trace(Visitor*) { } I personally pre
Marijn Kruisselbrink 2014/07/10 15:11:01 It seems the vast majority of code doesn't have an
Peter Beverloo 2014/07/10 16:31:36 It's my preference as a reviewer, you're welcome t
Marijn Kruisselbrink 2014/07/11 10:06:39 Done.
+
+ String id() const { return m_id; }
+
+protected:
+ GeofencingRegion()
Peter Beverloo 2014/07/10 13:17:28 This constructor isn't being used.
Marijn Kruisselbrink 2014/07/10 15:11:01 Good point, removed. If I later turn out to need i
+ {
+ ScriptWrappable::init(this);
+ }
+ GeofencingRegion(const String& id) : m_id(id)
+ {
+ ScriptWrappable::init(this);
+ }
+
+private:
+ String m_id;
+};
+
+} // namespace WebCore
+
+#endif

Powered by Google App Engine
This is Rietveld 408576698