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.
6 #include "modules/geofencing/CircularGeofencingRegion.h"
8 #include "bindings/core/v8/Dictionary.h"
9 #include "public/platform/WebString.h"
13 CircularGeofencingRegion* CircularGeofencingRegion::create(const Dictionary& dictionary)
16 DictionaryHelper::get(dictionary, "id", id);
17 WebCircularGeofencingRegion region;
18 DictionaryHelper::get(dictionary, "latitude", region.latitude);
19 DictionaryHelper::get(dictionary, "longitude", region.longitude);
20 DictionaryHelper::get(dictionary, "radius", region.radius);
21 return new CircularGeofencingRegion(id, region);
24 CircularGeofencingRegion* CircularGeofencingRegion::create(const WebString& id, const WebCircularGeofencingRegion& region)
26 return new CircularGeofencingRegion(id, region);
29 CircularGeofencingRegion::CircularGeofencingRegion(const String& id, const WebCircularGeofencingRegion& region)
30 : GeofencingRegion(id)
35 WebCircularGeofencingRegion CircularGeofencingRegion::webRegion() const