Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CircularGeofencingRegion_h | |
| 6 #define CircularGeofencingRegion_h | |
| 7 | |
| 8 #include "modules/geofencing/GeofencingRegion.h" | |
| 9 | |
| 10 namespace blink { | |
| 11 | |
| 12 class Dictionary; | |
| 13 struct WebCircularGeofencingRegion; | |
| 14 | |
| 15 class CircularGeofencingRegion FINAL : public GeofencingRegion { | |
| 16 DEFINE_WRAPPERTYPEINFO(); | |
| 17 WTF_MAKE_NONCOPYABLE(CircularGeofencingRegion); | |
| 18 public: | |
| 19 static CircularGeofencingRegion* create(const Dictionary& init); | |
| 20 static CircularGeofencingRegion* create(const WebCircularGeofencingRegion&); | |
| 21 virtual ~CircularGeofencingRegion() { } | |
| 22 | |
| 23 double latitude() const { return m_latitude; } | |
| 24 double longitude() const { return m_longitude; } | |
| 25 double radius() const { return m_radius; } | |
| 26 | |
| 27 WebCircularGeofencingRegion webRegion() const; | |
| 28 | |
| 29 virtual void trace(Visitor* visitor) OVERRIDE { GeofencingRegion::trace(visi tor); } | |
| 30 | |
| 31 virtual bool isCircularGeofencingRegion() const OVERRIDE { return true; } | |
| 32 | |
| 33 private: | |
| 34 explicit CircularGeofencingRegion(const WebCircularGeofencingRegion&); | |
| 35 | |
| 36 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.
| |
| 37 double m_longitude; | |
| 38 double m_radius; | |
| 39 }; | |
| 40 | |
| 41 DEFINE_TYPE_CASTS(CircularGeofencingRegion, GeofencingRegion, region, region->is CircularGeofencingRegion(), region.isCircularGeofencingRegion()); | |
| 42 | |
| 43 } // namespace blink | |
| 44 | |
| 45 #endif // CircularGeofencingRegion_h | |
| OLD | NEW |