| 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 #include "cc/base/list_container.h" | 5 #include "cc/base/list_container.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "cc/base/scoped_ptr_vector.h" | 10 #include "cc/base/scoped_ptr_vector.h" |
| (...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 } | 414 } |
| 415 | 415 |
| 416 size_t ListContainerBase::size() const { | 416 size_t ListContainerBase::size() const { |
| 417 return data_->size(); | 417 return data_->size(); |
| 418 } | 418 } |
| 419 | 419 |
| 420 bool ListContainerBase::empty() const { | 420 bool ListContainerBase::empty() const { |
| 421 return data_->IsEmpty(); | 421 return data_->IsEmpty(); |
| 422 } | 422 } |
| 423 | 423 |
| 424 size_t ListContainerBase::MaxSizeForDerivedClass() const { |
| 425 return data_->element_size(); |
| 426 } |
| 427 |
| 424 void ListContainerBase::clear() { | 428 void ListContainerBase::clear() { |
| 425 data_->Clear(); | 429 data_->Clear(); |
| 426 } | 430 } |
| 427 | 431 |
| 428 size_t ListContainerBase::AvailableSizeWithoutAnotherAllocationForTesting() | 432 size_t ListContainerBase::AvailableSizeWithoutAnotherAllocationForTesting() |
| 429 const { | 433 const { |
| 430 return data_->NumAvailableElementsInLastList(); | 434 return data_->NumAvailableElementsInLastList(); |
| 431 } | 435 } |
| 432 | 436 |
| 433 // ListContainerBase::Iterator | 437 // ListContainerBase::Iterator |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 } | 509 } |
| 506 | 510 |
| 507 ListContainerBase::ConstReverseIterator::~ConstReverseIterator() { | 511 ListContainerBase::ConstReverseIterator::~ConstReverseIterator() { |
| 508 } | 512 } |
| 509 | 513 |
| 510 size_t ListContainerBase::ConstReverseIterator::index() const { | 514 size_t ListContainerBase::ConstReverseIterator::index() const { |
| 511 return index_; | 515 return index_; |
| 512 } | 516 } |
| 513 | 517 |
| 514 } // namespace cc | 518 } // namespace cc |
| OLD | NEW |