OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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> |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 | 167 |
168 #define FOR_EACH_OBSERVER(ObserverType, observer_list, func) \ | 168 #define FOR_EACH_OBSERVER(ObserverType, observer_list, func) \ |
169 do { \ | 169 do { \ |
170 ObserverList<ObserverType>::Iterator it(observer_list); \ | 170 ObserverList<ObserverType>::Iterator it(observer_list); \ |
171 ObserverType* obs; \ | 171 ObserverType* obs; \ |
172 while ((obs = it.GetNext()) != NULL) \ | 172 while ((obs = it.GetNext()) != NULL) \ |
173 obs->func; \ | 173 obs->func; \ |
174 } while (0) | 174 } while (0) |
175 | 175 |
176 #endif // BASE_OBSERVER_LIST_H__ | 176 #endif // BASE_OBSERVER_LIST_H__ |
177 | |
OLD | NEW |