summaryrefslogtreecommitdiff
path: root/Source/WebCore/Modules/geolocation/GeolocationPosition.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/Modules/geolocation/GeolocationPosition.h')
-rw-r--r--Source/WebCore/Modules/geolocation/GeolocationPosition.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/Source/WebCore/Modules/geolocation/GeolocationPosition.h b/Source/WebCore/Modules/geolocation/GeolocationPosition.h
index 7b15648f8..d3548b658 100644
--- a/Source/WebCore/Modules/geolocation/GeolocationPosition.h
+++ b/Source/WebCore/Modules/geolocation/GeolocationPosition.h
@@ -23,20 +23,24 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef GeolocationPosition_h
-#define GeolocationPosition_h
+#pragma once
-#include <wtf/PassRefPtr.h>
+#include <wtf/Ref.h>
#include <wtf/RefCounted.h>
-#include <wtf/RefPtr.h>
namespace WebCore {
class GeolocationPosition : public RefCounted<GeolocationPosition> {
public:
- static PassRefPtr<GeolocationPosition> create(double timestamp, double latitude, double longitude, double accuracy) { return adoptRef(new GeolocationPosition(timestamp, latitude, longitude, accuracy)); }
+ static Ref<GeolocationPosition> create(double timestamp, double latitude, double longitude, double accuracy)
+ {
+ return adoptRef(*new GeolocationPosition(timestamp, latitude, longitude, accuracy));
+ }
- static PassRefPtr<GeolocationPosition> create(double timestamp, double latitude, double longitude, double accuracy, bool providesAltitude, double altitude, bool providesAltitudeAccuracy, double altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, double speed) { return adoptRef(new GeolocationPosition(timestamp, latitude, longitude, accuracy, providesAltitude, altitude, providesAltitudeAccuracy, altitudeAccuracy, providesHeading, heading, providesSpeed, speed)); }
+ static Ref<GeolocationPosition> create(double timestamp, double latitude, double longitude, double accuracy, bool providesAltitude, double altitude, bool providesAltitudeAccuracy, double altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, double speed)
+ {
+ return adoptRef(*new GeolocationPosition(timestamp, latitude, longitude, accuracy, providesAltitude, altitude, providesAltitudeAccuracy, altitudeAccuracy, providesHeading, heading, providesSpeed, speed));
+ }
double timestamp() const { return m_timestamp; }
@@ -103,5 +107,3 @@ private:
};
} // namespace WebCore
-
-#endif // GeolocationPosition_h