Index: Source/modules/geofencing/CircularGeofencingRegion.h |
diff --git a/Source/modules/geofencing/CircularGeofencingRegion.h b/Source/modules/geofencing/CircularGeofencingRegion.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..f97d8c6bc35c9cedf8ca98f906152e027862a09f |
--- /dev/null |
+++ b/Source/modules/geofencing/CircularGeofencingRegion.h |
@@ -0,0 +1,45 @@ |
+// 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 CircularGeofencingRegion_h |
+#define CircularGeofencingRegion_h |
+ |
+#include "modules/geofencing/GeofencingRegion.h" |
+ |
+namespace blink { |
+ |
+class Dictionary; |
+struct WebCircularGeofencingRegion; |
+ |
+class CircularGeofencingRegion FINAL : public GeofencingRegion { |
+ DEFINE_WRAPPERTYPEINFO(); |
+ WTF_MAKE_NONCOPYABLE(CircularGeofencingRegion); |
+public: |
+ static CircularGeofencingRegion* create(const Dictionary& init); |
+ static CircularGeofencingRegion* create(const WebCircularGeofencingRegion&); |
+ virtual ~CircularGeofencingRegion() { } |
+ |
+ double latitude() const { return m_latitude; } |
+ double longitude() const { return m_longitude; } |
+ double radius() const { return m_radius; } |
+ |
+ WebCircularGeofencingRegion webRegion() const; |
+ |
+ virtual void trace(Visitor* visitor) OVERRIDE { GeofencingRegion::trace(visitor); } |
+ |
+ virtual bool isCircularGeofencingRegion() const OVERRIDE { return true; } |
+ |
+private: |
+ explicit CircularGeofencingRegion(const WebCircularGeofencingRegion&); |
+ |
+ double m_latitude; |
jochen (gone - plz use gerrit)
2014/09/04 11:14:54
you could consider to just use a WebCirculerGeofen
Marijn Kruisselbrink
2014/09/04 17:44:19
Done.
|
+ double m_longitude; |
+ double m_radius; |
+}; |
+ |
+DEFINE_TYPE_CASTS(CircularGeofencingRegion, GeofencingRegion, region, region->isCircularGeofencingRegion(), region.isCircularGeofencingRegion()); |
+ |
+} // namespace blink |
+ |
+#endif // CircularGeofencingRegion_h |