| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_CALLBACK_LIST_H_ | 5 #ifndef BASE_CALLBACK_LIST_H_ |
| 6 #define BASE_CALLBACK_LIST_H_ | 6 #define BASE_CALLBACK_LIST_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | |
| 11 #include "base/callback.h" | 10 #include "base/callback.h" |
| 12 #include "base/callback_internal.h" | 11 #include "base/callback_internal.h" |
| 13 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 14 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "base/macros.h" |
| 15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 16 | 16 |
| 17 // OVERVIEW: | 17 // OVERVIEW: |
| 18 // | 18 // |
| 19 // A container for a list of callbacks. Unlike a normal STL vector or list, | 19 // A container for a list of callbacks. Unlike a normal STL vector or list, |
| 20 // this container can be modified during iteration without invalidating the | 20 // this container can be modified during iteration without invalidating the |
| 21 // iterator. It safely handles the case of a callback removing itself | 21 // iterator. It safely handles the case of a callback removing itself |
| 22 // or another callback from the list while callbacks are being run. | 22 // or another callback from the list while callbacks are being run. |
| 23 // | 23 // |
| 24 // TYPICAL USAGE: | 24 // TYPICAL USAGE: |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 } | 221 } |
| 222 } | 222 } |
| 223 | 223 |
| 224 private: | 224 private: |
| 225 DISALLOW_COPY_AND_ASSIGN(CallbackList); | 225 DISALLOW_COPY_AND_ASSIGN(CallbackList); |
| 226 }; | 226 }; |
| 227 | 227 |
| 228 } // namespace base | 228 } // namespace base |
| 229 | 229 |
| 230 #endif // BASE_CALLBACK_LIST_H_ | 230 #endif // BASE_CALLBACK_LIST_H_ |
| OLD | NEW |