| Index: ash/shelf/shelf_model.cc
|
| diff --git a/ash/shelf/shelf_model.cc b/ash/shelf/shelf_model.cc
|
| index b108a21f12c1c32523941d6ee3dd7af86fe005d3..d5d83f12e6a1001ad4bc7ca3fc351ea965cbdf3b 100644
|
| --- a/ash/shelf/shelf_model.cc
|
| +++ b/ash/shelf/shelf_model.cc
|
| @@ -131,6 +131,14 @@ int ShelfModel::ItemIndexByID(LauncherID id) const {
|
| return i == items_.end() ? -1 : static_cast<int>(i - items_.begin());
|
| }
|
|
|
| +int ShelfModel::GetItemIndexForType(LauncherItemType type) {
|
| + for (size_t i = 0; i < items_.size(); ++i) {
|
| + if (items_[i].type == type)
|
| + return i;
|
| + }
|
| + return -1;
|
| +}
|
| +
|
| LauncherItems::const_iterator ShelfModel::ItemByID(int id) const {
|
| for (LauncherItems::const_iterator i = items_.begin();
|
| i != items_.end(); ++i) {
|
|
|