OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 BASE_OBSERVER_LIST_THREADSAFE_H_ | 5 #ifndef BASE_OBSERVER_LIST_THREADSAFE_H_ |
6 #define BASE_OBSERVER_LIST_THREADSAFE_H_ | 6 #define BASE_OBSERVER_LIST_THREADSAFE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <map> | 10 #include <map> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "base/callback.h" | 13 #include "base/callback_old.h" |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
16 #include "base/message_loop.h" | 16 #include "base/message_loop.h" |
17 #include "base/observer_list.h" | 17 #include "base/observer_list.h" |
18 #include "base/task.h" | 18 #include "base/task.h" |
19 | 19 |
20 /////////////////////////////////////////////////////////////////////////////// | 20 /////////////////////////////////////////////////////////////////////////////// |
21 // | 21 // |
22 // OVERVIEW: | 22 // OVERVIEW: |
23 // | 23 // |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 | 226 |
227 // These are marked mutable to facilitate having NotifyAll be const. | 227 // These are marked mutable to facilitate having NotifyAll be const. |
228 base::Lock list_lock_; // Protects the observer_lists_. | 228 base::Lock list_lock_; // Protects the observer_lists_. |
229 ObserversListMap observer_lists_; | 229 ObserversListMap observer_lists_; |
230 const NotificationType type_; | 230 const NotificationType type_; |
231 | 231 |
232 DISALLOW_COPY_AND_ASSIGN(ObserverListThreadSafe); | 232 DISALLOW_COPY_AND_ASSIGN(ObserverListThreadSafe); |
233 }; | 233 }; |
234 | 234 |
235 #endif // BASE_OBSERVER_LIST_THREADSAFE_H_ | 235 #endif // BASE_OBSERVER_LIST_THREADSAFE_H_ |
OLD | NEW |