| 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 #include "modules/geofencing/CircularGeofencingRegion.h" | |
| 6 | |
| 7 #include "modules/geofencing/CircularGeofencingRegionInit.h" | |
| 8 #include "public/platform/WebString.h" | |
| 9 | |
| 10 namespace blink { | |
| 11 | |
| 12 CircularGeofencingRegion* CircularGeofencingRegion::create(const CircularGeofenc
ingRegionInit& init) | |
| 13 { | |
| 14 WebCircularGeofencingRegion region; | |
| 15 if (init.hasLatitude()) | |
| 16 region.latitude = init.latitude(); | |
| 17 if (init.hasLongitude()) | |
| 18 region.longitude = init.longitude(); | |
| 19 if (init.hasRadius()) | |
| 20 region.radius = init.radius(); | |
| 21 return new CircularGeofencingRegion(init.id(), region); | |
| 22 } | |
| 23 | |
| 24 CircularGeofencingRegion* CircularGeofencingRegion::create(const WebString& id,
const WebCircularGeofencingRegion& region) | |
| 25 { | |
| 26 return new CircularGeofencingRegion(id, region); | |
| 27 } | |
| 28 | |
| 29 CircularGeofencingRegion::CircularGeofencingRegion(const String& id, const WebCi
rcularGeofencingRegion& region) | |
| 30 : GeofencingRegion(id) | |
| 31 , m_webRegion(region) | |
| 32 { | |
| 33 } | |
| 34 | |
| 35 WebCircularGeofencingRegion CircularGeofencingRegion::webRegion() const | |
| 36 { | |
| 37 return m_webRegion; | |
| 38 } | |
| 39 | |
| 40 } // namespace blink | |
| OLD | NEW |