Chromium Code Reviews| Index: Source/modules/geolocation/GeoNotifier.h |
| diff --git a/Source/modules/geolocation/GeoNotifier.h b/Source/modules/geolocation/GeoNotifier.h |
| index d0c6178e829b6e672c38e0e4fe849d66b1ff45ff..5d88242bc7369611838a3747e48a74815333ed5a 100644 |
| --- a/Source/modules/geolocation/GeoNotifier.h |
| +++ b/Source/modules/geolocation/GeoNotifier.h |
| @@ -7,6 +7,7 @@ |
| #include "modules/geolocation/PositionCallback.h" |
| #include "modules/geolocation/PositionErrorCallback.h" |
| +#include "modules/geolocation/PositionOptions.h" |
| #include "platform/Timer.h" |
| #include "platform/heap/Handle.h" |
| @@ -15,17 +16,16 @@ namespace blink { |
| class Geolocation; |
| class Geoposition; |
| class PositionError; |
| -class PositionOptions; |
| class GeoNotifier : public GarbageCollectedFinalized<GeoNotifier> { |
| public: |
| - static GeoNotifier* create(Geolocation* geolocation, PositionCallback* positionCallback, PositionErrorCallback* positionErrorCallback, PositionOptions* options) |
| + static GeoNotifier* create(Geolocation* geolocation, PositionCallback* positionCallback, PositionErrorCallback* positionErrorCallback, const PositionOptions& options) |
| { |
| return new GeoNotifier(geolocation, positionCallback, positionErrorCallback, options); |
| } |
| void trace(Visitor*); |
| - PositionOptions* options() const { return m_options.get(); }; |
| + const PositionOptions& options() const { return m_options; } |
| // Sets the given error as the fatal error if there isn't one yet. |
| // Starts the timer with an interval of 0. |
| @@ -49,12 +49,12 @@ public: |
| void timerFired(Timer<GeoNotifier>*); |
| private: |
| - GeoNotifier(Geolocation*, PositionCallback*, PositionErrorCallback*, PositionOptions*); |
| + GeoNotifier(Geolocation*, PositionCallback*, PositionErrorCallback*, const PositionOptions&); |
| Member<Geolocation> m_geolocation; |
| Member<PositionCallback> m_successCallback; |
| Member<PositionErrorCallback> m_errorCallback; |
| - Member<PositionOptions> m_options; |
| + const PositionOptions m_options; |
|
haraken
2014/11/20 16:02:07
bashi-san: Just to confirm, is it safe to keep a d
bashi
2014/11/20 23:10:05
Yes, for now. But we might want to make dictionari
|
| Timer<GeoNotifier> m_timer; |
| Member<PositionError> m_fatalError; |
| bool m_useCachedPosition; |