| 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..a9bb199c622dfb114d0cf4da5dc35a146a777003
|
| --- /dev/null
|
| +++ b/Source/modules/geofencing/GeofencingRegion.cpp
|
| @@ -0,0 +1,28 @@
|
| +// 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>());
|
| + }
|
| + ASSERT_NOT_REACHED();
|
| + return 0;
|
| +}
|
| +
|
| +bool GeofencingRegion::isCircularRegion() const
|
| +{
|
| + return m_region.regionType() == WebGeofencingRegion::CircularRegionType;
|
| +}
|
| +
|
| +} // namespace blink
|
|
|