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

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

Issue 464073002: Pass through geofencing API calls to the content layer. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: only support circular regions for now 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 #ifndef CircularGeofencingRegion_h
6 #define CircularGeofencingRegion_h
7
8 #include "modules/geofencing/GeofencingRegion.h"
9
10 namespace blink {
11
12 class Dictionary;
13 struct WebCircularGeofencingRegion;
14
15 class CircularGeofencingRegion FINAL : public GeofencingRegion {
16 DEFINE_WRAPPERTYPEINFO();
17 WTF_MAKE_NONCOPYABLE(CircularGeofencingRegion);
18 public:
19 static CircularGeofencingRegion* create(const Dictionary& init);
20 static CircularGeofencingRegion* create(const WebCircularGeofencingRegion&);
21 virtual ~CircularGeofencingRegion() { }
22
23 double latitude() const { return m_latitude; }
24 double longitude() const { return m_longitude; }
25 double radius() const { return m_radius; }
26
27 WebCircularGeofencingRegion webRegion() const;
28
29 virtual void trace(Visitor* visitor) OVERRIDE { GeofencingRegion::trace(visi tor); }
30
31 virtual bool isCircularGeofencingRegion() const OVERRIDE { return true; }
32
33 private:
34 explicit CircularGeofencingRegion(const WebCircularGeofencingRegion&);
35
36 double m_latitude;
jochen (gone - plz use gerrit) 2014/09/04 11:14:54 you could consider to just use a WebCirculerGeofen
Marijn Kruisselbrink 2014/09/04 17:44:19 Done.
37 double m_longitude;
38 double m_radius;
39 };
40
41 DEFINE_TYPE_CASTS(CircularGeofencingRegion, GeofencingRegion, region, region->is CircularGeofencingRegion(), region.isCircularGeofencingRegion());
42
43 } // namespace blink
44
45 #endif // CircularGeofencingRegion_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698