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

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

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/Geolocation.h ('k') | Source/modules/geolocation/GeolocationWatchers.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/geolocation/Geolocation.cpp
diff --git a/Source/modules/geolocation/Geolocation.cpp b/Source/modules/geolocation/Geolocation.cpp
index ad25d142898ed6bfdb00331d7746b11365a30153..0eeb69fb681dd406ac201eb29d6875a524836149 100644
--- a/Source/modules/geolocation/Geolocation.cpp
+++ b/Source/modules/geolocation/Geolocation.cpp
@@ -79,70 +79,6 @@ static PositionError* createPositionError(GeolocationError* error)
return PositionError::create(code, error->message());
}
-void Geolocation::Watchers::trace(Visitor* visitor)
-{
- visitor->trace(m_idToNotifierMap);
- visitor->trace(m_notifierToIdMap);
-}
-
-bool Geolocation::Watchers::add(int id, GeoNotifier* notifier)
-{
- ASSERT(id > 0);
- if (!m_idToNotifierMap.add(id, notifier).isNewEntry)
- return false;
- m_notifierToIdMap.set(notifier, id);
- return true;
-}
-
-GeoNotifier* Geolocation::Watchers::find(int id)
-{
- ASSERT(id > 0);
- IdToNotifierMap::iterator iter = m_idToNotifierMap.find(id);
- if (iter == m_idToNotifierMap.end())
- return 0;
- return iter->value.get();
-}
-
-void Geolocation::Watchers::remove(int id)
-{
- ASSERT(id > 0);
- IdToNotifierMap::iterator iter = m_idToNotifierMap.find(id);
- if (iter == m_idToNotifierMap.end())
- return;
- m_notifierToIdMap.remove(iter->value);
- m_idToNotifierMap.remove(iter);
-}
-
-void Geolocation::Watchers::remove(GeoNotifier* notifier)
-{
- NotifierToIdMap::iterator iter = m_notifierToIdMap.find(notifier);
- if (iter == m_notifierToIdMap.end())
- return;
- m_idToNotifierMap.remove(iter->value);
- m_notifierToIdMap.remove(iter);
-}
-
-bool Geolocation::Watchers::contains(GeoNotifier* notifier) const
-{
- return m_notifierToIdMap.contains(notifier);
-}
-
-void Geolocation::Watchers::clear()
-{
- m_idToNotifierMap.clear();
- m_notifierToIdMap.clear();
-}
-
-bool Geolocation::Watchers::isEmpty() const
-{
- return m_idToNotifierMap.isEmpty();
-}
-
-void Geolocation::Watchers::getNotifiersVector(GeoNotifierVector& copy) const
-{
- copyValuesToVector(m_idToNotifierMap, copy);
-}
-
Geolocation* Geolocation::create(ExecutionContext* context)
{
Geolocation* geolocation = new Geolocation(context);
« no previous file with comments | « Source/modules/geolocation/Geolocation.h ('k') | Source/modules/geolocation/GeolocationWatchers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698