OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CC_BASE_LIST_CONTAINER_H_ | 5 #ifndef CC_BASE_LIST_CONTAINER_H_ |
6 #define CC_BASE_LIST_CONTAINER_H_ | 6 #define CC_BASE_LIST_CONTAINER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
| 10 #include <memory> |
| 11 |
10 #include "base/logging.h" | 12 #include "base/logging.h" |
11 #include "base/macros.h" | 13 #include "base/macros.h" |
12 #include "base/memory/scoped_ptr.h" | |
13 #include "cc/base/cc_export.h" | 14 #include "cc/base/cc_export.h" |
14 #include "cc/base/list_container_helper.h" | 15 #include "cc/base/list_container_helper.h" |
15 | 16 |
16 namespace cc { | 17 namespace cc { |
17 | 18 |
18 // ListContainer is a container type that handles allocating contiguous memory | 19 // ListContainer is a container type that handles allocating contiguous memory |
19 // for new elements and traversing through elements with either iterator or | 20 // for new elements and traversing through elements with either iterator or |
20 // reverse iterator. Since this container hands out raw pointers of its | 21 // reverse iterator. Since this container hands out raw pointers of its |
21 // elements, it is very important that this container never reallocate its | 22 // elements, it is very important that this container never reallocate its |
22 // memory so those raw pointer will continue to be valid. This class is used to | 23 // memory so those raw pointer will continue to be valid. This class is used to |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 | 338 |
338 private: | 339 private: |
339 ListContainerHelper helper_; | 340 ListContainerHelper helper_; |
340 | 341 |
341 DISALLOW_COPY_AND_ASSIGN(ListContainer); | 342 DISALLOW_COPY_AND_ASSIGN(ListContainer); |
342 }; | 343 }; |
343 | 344 |
344 } // namespace cc | 345 } // namespace cc |
345 | 346 |
346 #endif // CC_BASE_LIST_CONTAINER_H_ | 347 #endif // CC_BASE_LIST_CONTAINER_H_ |
OLD | NEW |