Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(316)

Unified Diff: ash/shelf/shelf_model.h

Issue 68523017: ash: Add GetItemIndexForType() function to ShelfModel. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/ash.gyp ('k') | ash/shelf/shelf_model.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_model.h
diff --git a/ash/shelf/shelf_model.h b/ash/shelf/shelf_model.h
index 58e931ab9cf3f10206d57863c642b88b0795e76c..cf51a017da90aee55195ccf3e8b0c84fd2ec0906 100644
--- a/ash/shelf/shelf_model.h
+++ b/ash/shelf/shelf_model.h
@@ -47,6 +47,11 @@ class ASH_EXPORT ShelfModel {
// Returns the index of the item by id.
int ItemIndexByID(LauncherID id) const;
+ // Returns the |index| of the item matching |type| in |items_|.
+ // Returns -1 if the matching item is not found.
+ // Note: Requires a linear search.
+ int GetItemIndexForType(LauncherItemType type);
+
// Returns the index of the first panel or the index where the first panel
// would go if there are no panels.
int FirstPanelIndex() const;
« no previous file with comments | « ash/ash.gyp ('k') | ash/shelf/shelf_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698