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

Side by Side Diff: Source/modules/geolocation/GeolocationWatchers.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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef GeolocationWatchers_h
6 #define GeolocationWatchers_h
7
8 #include "platform/heap/Handle.h"
9
10 namespace WebCore {
11
12 class GeoNotifier;
13
14 class GeolocationWatchers {
15 DISALLOW_ALLOCATION();
16
17 public:
18 GeolocationWatchers() { }
19 void trace(Visitor*);
20
21 bool add(int id, GeoNotifier*);
22 GeoNotifier* find(int id);
23 void remove(int id);
24 void remove(GeoNotifier*);
25 bool contains(GeoNotifier*) const;
26 void clear();
27 bool isEmpty() const;
28
29 void getNotifiersVector(HeapVector<Member<GeoNotifier> >&) const;
30
31 private:
32 typedef HeapHashMap<int, Member<GeoNotifier> > IdToNotifierMap;
33 typedef HeapHashMap<Member<GeoNotifier>, int> NotifierToIdMap;
34
35 IdToNotifierMap m_idToNotifierMap;
36 NotifierToIdMap m_notifierToIdMap;
37 };
38
39 } // namespace WebCore
40
41 #endif // GeolocationWatchers_h
OLDNEW
« no previous file with comments | « Source/modules/geolocation/Geolocation.cpp ('k') | Source/modules/geolocation/GeolocationWatchers.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698