OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include "ash/shelf/shelf_model_util.h" | |
6 | |
7 #include "ash/shelf/shelf_model.h" | |
8 | |
9 namespace ash { | |
10 | |
11 int GetShelfItemIndexForType(LauncherItemType type, | |
12 const ShelfModel& shelf_model) { | |
13 for (size_t i = 0; i < shelf_model.items().size(); i++) { | |
14 if (shelf_model.items()[i].type == type) | |
15 return i; | |
16 } | |
17 return -1; | |
18 } | |
19 | |
20 } // namespace ash | |
OLD | NEW |