| 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 #pragma once | |
| 8 | 7 |
| 9 #include <algorithm> | 8 #include <algorithm> |
| 10 #include <limits> | 9 #include <limits> |
| 11 #include <vector> | 10 #include <vector> |
| 12 | 11 |
| 13 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 14 #include "base/logging.h" | 13 #include "base/logging.h" |
| 15 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
| 16 | 15 |
| 17 /////////////////////////////////////////////////////////////////////////////// | 16 /////////////////////////////////////////////////////////////////////////////// |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 do { \ | 207 do { \ |
| 209 if ((observer_list).might_have_observers()) { \ | 208 if ((observer_list).might_have_observers()) { \ |
| 210 ObserverListBase<ObserverType>::Iterator it(observer_list); \ | 209 ObserverListBase<ObserverType>::Iterator it(observer_list); \ |
| 211 ObserverType* obs; \ | 210 ObserverType* obs; \ |
| 212 while ((obs = it.GetNext()) != NULL) \ | 211 while ((obs = it.GetNext()) != NULL) \ |
| 213 obs->func; \ | 212 obs->func; \ |
| 214 } \ | 213 } \ |
| 215 } while (0) | 214 } while (0) |
| 216 | 215 |
| 217 #endif // BASE_OBSERVER_LIST_H__ | 216 #endif // BASE_OBSERVER_LIST_H__ |
| OLD | NEW |