| 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/ModulesExport.h" | |
| 9 #include "modules/geofencing/GeofencingRegion.h" | |
| 10 #include "public/platform/WebCircularGeofencingRegion.h" | |
| 11 | |
| 12 namespace blink { | |
| 13 | |
| 14 class CircularGeofencingRegionInit; | |
| 15 | |
| 16 class MODULES_EXPORT CircularGeofencingRegion final : public GeofencingRegion { | |
| 17 DEFINE_WRAPPERTYPEINFO(); | |
| 18 WTF_MAKE_NONCOPYABLE(CircularGeofencingRegion); | |
| 19 public: | |
| 20 static CircularGeofencingRegion* create(const CircularGeofencingRegionInit&)
; | |
| 21 static CircularGeofencingRegion* create(const WebString& id, const WebCircul
arGeofencingRegion&); | |
| 22 ~CircularGeofencingRegion() override { } | |
| 23 | |
| 24 double latitude() const { return m_webRegion.latitude; } | |
| 25 double longitude() const { return m_webRegion.longitude; } | |
| 26 double radius() const { return m_webRegion.radius; } | |
| 27 | |
| 28 WebCircularGeofencingRegion webRegion() const; | |
| 29 | |
| 30 DEFINE_INLINE_VIRTUAL_TRACE() { GeofencingRegion::trace(visitor); } | |
| 31 | |
| 32 bool isCircularGeofencingRegion() const override { return true; } | |
| 33 | |
| 34 private: | |
| 35 explicit CircularGeofencingRegion(const String& id, const WebCircularGeofenc
ingRegion&); | |
| 36 | |
| 37 WebCircularGeofencingRegion m_webRegion; | |
| 38 }; | |
| 39 | |
| 40 DEFINE_TYPE_CASTS(CircularGeofencingRegion, GeofencingRegion, region, region->is
CircularGeofencingRegion(), region.isCircularGeofencingRegion()); | |
| 41 | |
| 42 } // namespace blink | |
| 43 | |
| 44 #endif // CircularGeofencingRegion_h | |
| OLD | NEW |