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

Side by Side Diff: Source/modules/geolocation/CircularRegion.h

Issue 375353002: Add the first very basic bits of a geofencing API. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: address comments Created 6 years, 5 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 CircularRegion_h
6 #define CircularRegion_h
7
8 #include "modules/geolocation/GeofencingRegion.h"
9
10 namespace WebCore {
11
12 class Dictionary;
13
14 struct CircularRegionInit {
15 CircularRegionInit() : latitude(0), longitude(0), radius(0) { }
16 explicit CircularRegionInit(const Dictionary& init);
17
18 String id;
19 double latitude;
20 double longitude;
21 double radius;
22 };
23
24 class CircularRegion : public GeofencingRegion {
Peter Beverloo 2014/07/10 13:17:27 Could mark this as FINAL.
Marijn Kruisselbrink 2014/07/10 15:11:01 Done.
25 WTF_MAKE_NONCOPYABLE(CircularRegion);
26 public:
27 static CircularRegion* create(const Dictionary& init);
28
29 double latitude() const { return m_latitude; }
30 double longitude() const { return m_longitude; }
31 double radius() const { return m_radius; }
32
33 private:
34 explicit CircularRegion(const CircularRegionInit&);
35
36 double m_latitude;
37 double m_longitude;
38 double m_radius;
39 };
40
41 } // namespace WebCore
42
43 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698