Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(700)

Side by Side Diff: Source/modules/geofencing/CircularGeofencingRegion.cpp

Issue 464073002: Pass through geofencing API calls to the content layer. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix test expectations Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 }
34
35 WebCircularGeofencingRegion CircularGeofencingRegion::webRegion() const
36 {
37 return m_webRegion;
38 }
39
40 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/geofencing/CircularGeofencingRegion.h ('k') | Source/modules/geofencing/CircularGeofencingRegion.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698