Chromium Code Reviews| Index: Source/web/WebGeofencingRegion.cpp |
| diff --git a/Source/web/WebGeofencingRegion.cpp b/Source/web/WebGeofencingRegion.cpp |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..5f6d59af45e1d01d3fa0a8ff6ca2c223f4654eec |
| --- /dev/null |
| +++ b/Source/web/WebGeofencingRegion.cpp |
| @@ -0,0 +1,51 @@ |
| +// 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/platform/WebGeofencingRegion.h" |
| + |
| +#include "modules/geolocation/CircularRegion.h" |
| +#include "modules/geolocation/GeofencingRegion.h" |
| +#include "public/web/WebCircularRegion.h" |
| + |
| +using namespace WebCore; |
| + |
| +namespace blink { |
| + |
| +void WebGeofencingRegion::assign(const WebGeofencingRegion& other) |
| +{ |
| + m_private = other.m_private; |
| +} |
| + |
| +void WebGeofencingRegion::reset() |
| +{ |
| + m_private.reset(); |
| +} |
| + |
| +WebString WebGeofencingRegion::id() const |
| +{ |
| + return m_private->id(); |
| +} |
| + |
| +WebGeofencingRegion::WebGeofencingRegion(GeofencingRegion* region) |
| +{ |
| + m_private = region; |
| +} |
| + |
| +WebGeofencingRegion::operator GeofencingRegion*() const |
| +{ |
| + return m_private.get(); |
| +} |
| + |
| +bool WebGeofencingRegion::isCircularRegion() const |
|
Peter Beverloo
2014/07/14 17:23:08
nit: it's nice if the order of methods in a .cpp m
|
| +{ |
| + return !m_private.isNull() && m_private->isCircularRegion(); |
| +} |
| + |
| +WebCircularRegion WebGeofencingRegion::asCircularRegion() const |
| +{ |
| + return WebCircularRegion(static_cast<CircularRegion*>(m_private.get())); |
| +} |
| + |
| +} // namespace blink |