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

Side by Side Diff: third_party/WebKit/Source/modules/geolocation/GeolocationWatchers.h

Issue 1406923009: Rename DISALLOW_ALLOCATION and ALLOW_ONLY_INLINE_ALLOCATION (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef GeolocationWatchers_h 5 #ifndef GeolocationWatchers_h
6 #define GeolocationWatchers_h 6 #define GeolocationWatchers_h
7 7
8 #include "platform/heap/Handle.h" 8 #include "platform/heap/Handle.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 class GeoNotifier; 12 class GeoNotifier;
13 13
14 class GeolocationWatchers { 14 class GeolocationWatchers {
15 DISALLOW_ALLOCATION(); 15 DISALLOW_NEW();
16 16
17 public: 17 public:
18 GeolocationWatchers() { } 18 GeolocationWatchers() { }
19 DECLARE_TRACE(); 19 DECLARE_TRACE();
20 20
21 bool add(int id, GeoNotifier*); 21 bool add(int id, GeoNotifier*);
22 GeoNotifier* find(int id); 22 GeoNotifier* find(int id);
23 void remove(int id); 23 void remove(int id);
24 void remove(GeoNotifier*); 24 void remove(GeoNotifier*);
25 bool contains(GeoNotifier*) const; 25 bool contains(GeoNotifier*) const;
26 void clear(); 26 void clear();
27 bool isEmpty() const; 27 bool isEmpty() const;
28 28
29 void getNotifiersVector(HeapVector<Member<GeoNotifier>>&) const; 29 void getNotifiersVector(HeapVector<Member<GeoNotifier>>&) const;
30 30
31 private: 31 private:
32 typedef HeapHashMap<int, Member<GeoNotifier>> IdToNotifierMap; 32 typedef HeapHashMap<int, Member<GeoNotifier>> IdToNotifierMap;
33 typedef HeapHashMap<Member<GeoNotifier>, int> NotifierToIdMap; 33 typedef HeapHashMap<Member<GeoNotifier>, int> NotifierToIdMap;
34 34
35 IdToNotifierMap m_idToNotifierMap; 35 IdToNotifierMap m_idToNotifierMap;
36 NotifierToIdMap m_notifierToIdMap; 36 NotifierToIdMap m_notifierToIdMap;
37 }; 37 };
38 38
39 } // namespace blink 39 } // namespace blink
40 40
41 #endif // GeolocationWatchers_h 41 #endif // GeolocationWatchers_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698