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

Side by Side Diff: content/browser/notification_service_impl.h

Issue 1162943002: Replace more ObserverList with base::ObserverList. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@observer
Patch Set: Created 5 years, 6 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_BROWSER_NOTIFICATION_SERVICE_IMPL_H_ 5 #ifndef CONTENT_BROWSER_NOTIFICATION_SERVICE_IMPL_H_
6 #define CONTENT_BROWSER_NOTIFICATION_SERVICE_IMPL_H_ 6 #define CONTENT_BROWSER_NOTIFICATION_SERVICE_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/observer_list.h" 10 #include "base/observer_list.h"
(...skipping 15 matching lines...) Expand all
26 ~NotificationServiceImpl() override; 26 ~NotificationServiceImpl() override;
27 27
28 // NotificationService: 28 // NotificationService:
29 void Notify(int type, 29 void Notify(int type,
30 const NotificationSource& source, 30 const NotificationSource& source,
31 const NotificationDetails& details) override; 31 const NotificationDetails& details) override;
32 32
33 private: 33 private:
34 friend class NotificationRegistrar; 34 friend class NotificationRegistrar;
35 35
36 typedef ObserverList<NotificationObserver> NotificationObserverList; 36 typedef base::ObserverList<NotificationObserver> NotificationObserverList;
37 typedef std::map<uintptr_t, NotificationObserverList*> NotificationSourceMap; 37 typedef std::map<uintptr_t, NotificationObserverList*> NotificationSourceMap;
38 typedef std::map<int, NotificationSourceMap> NotificationObserverMap; 38 typedef std::map<int, NotificationSourceMap> NotificationObserverMap;
39 typedef std::map<int, int> NotificationObserverCount; 39 typedef std::map<int, int> NotificationObserverCount;
40 40
41 // Convenience function to determine whether a source has a 41 // Convenience function to determine whether a source has a
42 // NotificationObserverList in the given map; 42 // NotificationObserverList in the given map;
43 static bool HasKey(const NotificationSourceMap& map, 43 static bool HasKey(const NotificationSourceMap& map,
44 const NotificationSource& source); 44 const NotificationSource& source);
45 45
46 // NOTE: Rather than using this directly, you should use a 46 // NOTE: Rather than using this directly, you should use a
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 // balanced. 86 // balanced.
87 NotificationObserverCount observer_counts_; 87 NotificationObserverCount observer_counts_;
88 #endif 88 #endif
89 89
90 DISALLOW_COPY_AND_ASSIGN(NotificationServiceImpl); 90 DISALLOW_COPY_AND_ASSIGN(NotificationServiceImpl);
91 }; 91 };
92 92
93 } // namespace content 93 } // namespace content
94 94
95 #endif // CONTENT_BROWSER_NOTIFICATION_SERVICE_IMPL_H_ 95 #endif // CONTENT_BROWSER_NOTIFICATION_SERVICE_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/media/webrtc_internals.h ('k') | content/browser/power_profiler/power_profiler_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698