Index: Source/modules/geofencing/GeofencingRegion.cpp |
diff --git a/Source/modules/geofencing/GeofencingRegion.cpp b/Source/modules/geofencing/GeofencingRegion.cpp |
new file mode 100644 |
index 0000000000000000000000000000000000000000..cea127275ce1632048fa9ca86b85d8684e2c47f8 |
--- /dev/null |
+++ b/Source/modules/geofencing/GeofencingRegion.cpp |
@@ -0,0 +1,24 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "config.h" |
+#include "modules/geofencing/GeofencingRegion.h" |
+ |
+#include "modules/geofencing/CircularRegion.h" |
+#include "public/platform/WebCircularRegion.h" |
+ |
+namespace blink { |
+ |
+GeofencingRegion* GeofencingRegion::createFromWebRegion(const WebGeofencingRegion& region) |
+{ |
+ switch (region.regionType()) { |
+ case WebGeofencingRegion::CircularRegionType: |
+ return new CircularRegion(region.toConst<WebCircularRegion>()); |
+ default: |
+ ASSERT_NOT_REACHED(); |
+ } |
+ return 0; |
+} |
+ |
+} // namespace blink |