Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1259)

Unified Diff: Source/modules/geolocation/Geolocation.h

Issue 402563002: Separate GeolocationWatchers from Geolocation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch for landing Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/geolocation/GeoNotifier.cpp ('k') | Source/modules/geolocation/Geolocation.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/geolocation/Geolocation.h
diff --git a/Source/modules/geolocation/Geolocation.h b/Source/modules/geolocation/Geolocation.h
index f904ab5e5592452a927f0e5e96139be5e2befca9..932eddfede9dab91c0b5fd1ec6de940bacffe23d 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"
#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;
« no previous file with comments | « Source/modules/geolocation/GeoNotifier.cpp ('k') | Source/modules/geolocation/Geolocation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698