Index: Source/modules/geolocation/GeolocationInspectorAgent.cpp |
diff --git a/Source/modules/geolocation/GeolocationInspectorAgent.cpp b/Source/modules/geolocation/GeolocationInspectorAgent.cpp |
index aee328e59e988ddb4b2ccb61cf6b43fa27554a2f..4e853f58c4a02c6a2c71aff6135ca356db0355be 100644 |
--- a/Source/modules/geolocation/GeolocationInspectorAgent.cpp |
+++ b/Source/modules/geolocation/GeolocationInspectorAgent.cpp |
@@ -46,13 +46,14 @@ GeolocationInspectorAgent::~GeolocationInspectorAgent() |
GeolocationInspectorAgent::GeolocationInspectorAgent() |
: InspectorBaseAgent<GeolocationInspectorAgent>("Geolocation") |
+ , m_controllers(new GeolocationControllers()) |
, m_geolocationOverridden(false) |
{ |
} |
void GeolocationInspectorAgent::setGeolocationOverride(ErrorString* error, const double* latitude, const double* longitude, const double* accuracy) |
{ |
- GeolocationPosition* position = (*m_controllers.begin())->lastPosition(); |
+ GeolocationPosition* position = (*m_controllers->begin())->lastPosition(); |
if (!m_geolocationOverridden && position) |
m_platformGeolocationPosition = position; |
@@ -62,7 +63,7 @@ void GeolocationInspectorAgent::setGeolocationOverride(ErrorString* error, const |
else |
m_geolocationPosition.clear(); |
- for (WTF::HashSet<GeolocationController*>::iterator it = m_controllers.begin(); it != m_controllers.end(); ++it) |
+ for (GeolocationControllers::iterator it = m_controllers->begin(); it != m_controllers->end(); ++it) |
(*it)->positionChanged(0); // Kick location update. |
} |
@@ -73,9 +74,9 @@ void GeolocationInspectorAgent::clearGeolocationOverride(ErrorString*) |
m_geolocationOverridden = false; |
m_geolocationPosition.clear(); |
- if (m_platformGeolocationPosition.get()) { |
- for (WTF::HashSet<GeolocationController*>::iterator it = m_controllers.begin(); it != m_controllers.end(); ++it) |
- (*it)->positionChanged(m_platformGeolocationPosition.get()); |
+ if (GeolocationPosition* platformPosition = m_platformGeolocationPosition.get()) { |
+ for (GeolocationControllers::iterator it = m_controllers->begin(); it != m_controllers->end(); ++it) |
+ (*it)->positionChanged(platformPosition); |
} |
} |
@@ -91,12 +92,12 @@ GeolocationPosition* GeolocationInspectorAgent::overrideGeolocationPosition(Geol |
void GeolocationInspectorAgent::AddController(GeolocationController* controller) |
{ |
- m_controllers.add(controller); |
+ m_controllers->add(controller); |
} |
void GeolocationInspectorAgent::RemoveController(GeolocationController* controller) |
{ |
- m_controllers.remove(controller); |
+ m_controllers->remove(controller); |
} |
} // namespace WebCore |