summaryrefslogtreecommitdiff
path: root/Source/WebCore/Modules/geolocation/Coordinates.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/Modules/geolocation/Coordinates.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/Modules/geolocation/Coordinates.h')
-rw-r--r--Source/WebCore/Modules/geolocation/Coordinates.h18
1 files changed, 8 insertions, 10 deletions
diff --git a/Source/WebCore/Modules/geolocation/Coordinates.h b/Source/WebCore/Modules/geolocation/Coordinates.h
index fb134a502..08c313b18 100644
--- a/Source/WebCore/Modules/geolocation/Coordinates.h
+++ b/Source/WebCore/Modules/geolocation/Coordinates.h
@@ -23,30 +23,30 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef Coordinates_h
-#define Coordinates_h
+#pragma once
#include "Event.h"
+#include <wtf/Optional.h>
#include <wtf/RefCounted.h>
namespace WebCore {
class Coordinates : public RefCounted<Coordinates> {
public:
- static PassRefPtr<Coordinates> create(double latitude, double longitude, bool providesAltitude, double altitude, double accuracy, bool providesAltitudeAccuracy, double altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, double speed) { return adoptRef(new Coordinates(latitude, longitude, providesAltitude, altitude, accuracy, providesAltitudeAccuracy, altitudeAccuracy, providesHeading, heading, providesSpeed, speed)); }
+ static Ref<Coordinates> create(double latitude, double longitude, bool providesAltitude, double altitude, double accuracy, bool providesAltitudeAccuracy, double altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, double speed) { return adoptRef(*new Coordinates(latitude, longitude, providesAltitude, altitude, accuracy, providesAltitudeAccuracy, altitudeAccuracy, providesHeading, heading, providesSpeed, speed)); }
- PassRefPtr<Coordinates> isolatedCopy() const
+ Ref<Coordinates> isolatedCopy() const
{
return Coordinates::create(m_latitude, m_longitude, m_canProvideAltitude, m_altitude, m_accuracy, m_canProvideAltitudeAccuracy, m_altitudeAccuracy, m_canProvideHeading, m_heading, m_canProvideSpeed, m_speed);
}
double latitude() const { return m_latitude; }
double longitude() const { return m_longitude; }
- double altitude(bool& isNull) const;
+ std::optional<double> altitude() const;
double accuracy() const { return m_accuracy; }
- double altitudeAccuracy(bool& isNull) const;
- double heading(bool& isNull) const;
- double speed(bool& isNull) const;
+ std::optional<double> altitudeAccuracy() const;
+ std::optional<double> heading() const;
+ std::optional<double> speed() const;
private:
Coordinates(double latitude, double longitude, bool providesAltitude, double altitude, double accuracy, bool providesAltitudeAccuracy, double altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, double speed)
@@ -79,5 +79,3 @@ private:
};
} // namespace WebCore
-
-#endif // Coordinates_h