OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2009 Apple Inc. All Rights Reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 11 matching lines...) Expand all Loading... |
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
24 */ | 24 */ |
25 | 25 |
26 #ifndef Coordinates_h | 26 #ifndef Coordinates_h |
27 #define Coordinates_h | 27 #define Coordinates_h |
28 | 28 |
29 #include "bindings/v8/ScriptWrappable.h" | 29 #include "bindings/v8/ScriptWrappable.h" |
30 #include "modules/EventModules.h" | 30 #include "modules/EventModules.h" |
31 #include "platform/heap/Handle.h" | 31 #include "platform/heap/Handle.h" |
32 #include "wtf/RefCounted.h" | |
33 | 32 |
34 namespace WebCore { | 33 namespace WebCore { |
35 | 34 |
36 class Coordinates : public RefCountedWillBeGarbageCollectedFinalized<Coordinates
>, public ScriptWrappable { | 35 class Coordinates : public GarbageCollectedFinalized<Coordinates>, public Script
Wrappable { |
37 public: | 36 public: |
38 static PassRefPtrWillBeRawPtr<Coordinates> create(double latitude, double lo
ngitude, bool providesAltitude, double altitude, double accuracy, bool providesA
ltitudeAccuracy, double altitudeAccuracy, bool providesHeading, double heading,
bool providesSpeed, double speed) | 37 static Coordinates* create(double latitude, double longitude, bool providesA
ltitude, double altitude, double accuracy, bool providesAltitudeAccuracy, double
altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, dou
ble speed) |
39 { | 38 { |
40 return adoptRefWillBeNoop(new Coordinates(latitude, longitude, providesA
ltitude, altitude, accuracy, providesAltitudeAccuracy, altitudeAccuracy, provide
sHeading, heading, providesSpeed, speed)); | 39 return new Coordinates(latitude, longitude, providesAltitude, altitude,
accuracy, providesAltitudeAccuracy, altitudeAccuracy, providesHeading, heading,
providesSpeed, speed); |
41 } | 40 } |
42 void trace(Visitor*) { } | 41 void trace(Visitor*) { } |
43 | 42 |
44 double latitude() const { return m_latitude; } | 43 double latitude() const { return m_latitude; } |
45 double longitude() const { return m_longitude; } | 44 double longitude() const { return m_longitude; } |
46 double altitude(bool& isNull) const; | 45 double altitude(bool& isNull) const; |
47 double accuracy() const { return m_accuracy; } | 46 double accuracy() const { return m_accuracy; } |
48 double altitudeAccuracy(bool& isNull) const; | 47 double altitudeAccuracy(bool& isNull) const; |
49 double heading(bool& isNull) const; | 48 double heading(bool& isNull) const; |
50 double speed(bool& isNull) const; | 49 double speed(bool& isNull) const; |
(...skipping 25 matching lines...) Expand all Loading... |
76 | 75 |
77 bool m_canProvideAltitude; | 76 bool m_canProvideAltitude; |
78 bool m_canProvideAltitudeAccuracy; | 77 bool m_canProvideAltitudeAccuracy; |
79 bool m_canProvideHeading; | 78 bool m_canProvideHeading; |
80 bool m_canProvideSpeed; | 79 bool m_canProvideSpeed; |
81 }; | 80 }; |
82 | 81 |
83 } // namespace WebCore | 82 } // namespace WebCore |
84 | 83 |
85 #endif // Coordinates_h | 84 #endif // Coordinates_h |
OLD | NEW |