Chromium Code Reviews| Index: Source/modules/geolocation/Geolocation.h |
| diff --git a/Source/modules/geolocation/Geolocation.h b/Source/modules/geolocation/Geolocation.h |
| index caa59adbbcc89f07a7f81df7de4ad54aa8c82876..f7b79bb7e52c1f76fce33adb4fd606129ccf396f 100644 |
| --- a/Source/modules/geolocation/Geolocation.h |
| +++ b/Source/modules/geolocation/Geolocation.h |
| @@ -31,6 +31,7 @@ |
| #include "bindings/core/v8/ScriptWrappable.h" |
| #include "core/dom/ActiveDOMObject.h" |
| #include "modules/geolocation/GeoNotifier.h" |
| +#include "modules/geolocation/GeolocationWatchers.h" |
|
Michael van Ouwerkerk
2014/07/18 12:07:39
I think you can forward declare GeolocationWatcher
kihong
2014/07/18 14:28:25
You are right, I made a mistake.
I will change it
kihong
2014/07/18 15:36:06
I have got misunderstanding, I think you've got it
|
| #include "modules/geolocation/Geoposition.h" |
| #include "modules/geolocation/PositionCallback.h" |
| #include "modules/geolocation/PositionError.h" |
| @@ -111,25 +112,6 @@ private: |
| typedef HeapVector<Member<GeoNotifier> > GeoNotifierVector; |
| typedef HeapHashSet<Member<GeoNotifier> > GeoNotifierSet; |
| - class Watchers { |
| - DISALLOW_ALLOCATION(); |
| - public: |
| - void trace(Visitor*); |
| - bool add(int id, GeoNotifier*); |
| - GeoNotifier* find(int id); |
| - void remove(int id); |
| - void remove(GeoNotifier*); |
| - bool contains(GeoNotifier*) const; |
| - void clear(); |
| - bool isEmpty() const; |
| - void getNotifiersVector(GeoNotifierVector&) const; |
| - private: |
| - typedef HeapHashMap<int, Member<GeoNotifier> > IdToNotifierMap; |
| - typedef HeapHashMap<Member<GeoNotifier>, int> NotifierToIdMap; |
| - IdToNotifierMap m_idToNotifierMap; |
| - NotifierToIdMap m_notifierToIdMap; |
| - }; |
| - |
| bool hasListeners() const { return !m_oneShots.isEmpty() || !m_watchers.isEmpty(); } |
| void sendError(GeoNotifierVector&, PositionError*); |
| @@ -188,7 +170,7 @@ private: |
| void makeCachedPositionCallbacks(); |
| GeoNotifierSet m_oneShots; |
| - Watchers m_watchers; |
| + GeolocationWatchers m_watchers; |
| GeoNotifierSet m_pendingForPermissionNotifiers; |
| Member<Geoposition> m_lastPosition; |