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_H__ | 5 #ifndef BASE_OBSERVER_LIST_H_ |
6 #define BASE_OBSERVER_LIST_H__ | 6 #define BASE_OBSERVER_LIST_H_ |
7 | 7 |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <limits> | 9 #include <limits> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
15 | 15 |
16 /////////////////////////////////////////////////////////////////////////////// | 16 /////////////////////////////////////////////////////////////////////////////// |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 do { \ | 233 do { \ |
234 if ((observer_list).might_have_observers()) { \ | 234 if ((observer_list).might_have_observers()) { \ |
235 ObserverListBase<ObserverType>::Iterator it_inside_observer_macro( \ | 235 ObserverListBase<ObserverType>::Iterator it_inside_observer_macro( \ |
236 &observer_list); \ | 236 &observer_list); \ |
237 ObserverType* obs; \ | 237 ObserverType* obs; \ |
238 while ((obs = it_inside_observer_macro.GetNext()) != nullptr) \ | 238 while ((obs = it_inside_observer_macro.GetNext()) != nullptr) \ |
239 obs->func; \ | 239 obs->func; \ |
240 } \ | 240 } \ |
241 } while (0) | 241 } while (0) |
242 | 242 |
243 #endif // BASE_OBSERVER_LIST_H__ | 243 #endif // BASE_OBSERVER_LIST_H_ |
OLD | NEW |