Index: Source/web/WebCircularRegion.cpp |
diff --git a/Source/web/WebCircularRegion.cpp b/Source/web/WebCircularRegion.cpp |
new file mode 100644 |
index 0000000000000000000000000000000000000000..ce52f18ee885774601e8c53777eaff60958538e2 |
--- /dev/null |
+++ b/Source/web/WebCircularRegion.cpp |
@@ -0,0 +1,37 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
Peter Beverloo
2014/07/14 17:23:08
This should be in Source/platform/exported/.
|
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "config.h" |
+#include "public/web/WebCircularRegion.h" |
+ |
+#include "modules/geolocation/CircularRegion.h" |
+ |
+using namespace WebCore; |
+ |
+namespace blink { |
+ |
+double WebCircularRegion::latitude() const |
+{ |
+ return static_cast<CircularRegion*>(*this)->latitude(); |
Peter Beverloo
2014/07/14 17:23:08
|this| is a pointer, the dereference doesn't make
|
+} |
+ |
+double WebCircularRegion::longitude() const |
+{ |
+ return static_cast<CircularRegion*>(*this)->longitude(); |
+} |
+ |
+double WebCircularRegion::radius() const |
+{ |
+ return static_cast<CircularRegion*>(*this)->radius(); |
+} |
+ |
+WebCircularRegion::WebCircularRegion(CircularRegion* region) |
+ : WebGeofencingRegion(region) { } |
+ |
+WebCircularRegion::operator CircularRegion*() const |
+{ |
+ return static_cast<CircularRegion*>(static_cast<GeofencingRegion*>(*this)); |
Peter Beverloo
2014/07/14 17:23:08
I really don't like all these static_casts. We sho
Peter Beverloo
2014/07/14 18:16:12
Note that |toCircularRegion| would be a private BL
|
+} |
+ |
+} // namespace blink |