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 "config.h" |
| 6 #include "modules/geofencing/CircularGeofencingRegion.h" |
| 7 |
| 8 #include "bindings/core/v8/Dictionary.h" |
| 9 #include "public/platform/WebString.h" |
| 10 |
| 11 namespace blink { |
| 12 |
| 13 CircularGeofencingRegion* CircularGeofencingRegion::create(const Dictionary& dic
tionary) |
| 14 { |
| 15 String id; |
| 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); |
| 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 ScriptWrappable::init(this); |
| 34 } |
| 35 |
| 36 WebCircularGeofencingRegion CircularGeofencingRegion::webRegion() const |
| 37 { |
| 38 return m_webRegion; |
| 39 } |
| 40 |
| 41 } // namespace blink |
OLD | NEW |