Index: ash/launcher/launcher_model_util.h |
diff --git a/ash/launcher/launcher_model_util.h b/ash/launcher/launcher_model_util.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..9cc9932100262f901edf698484d86a146d036686 |
--- /dev/null |
+++ b/ash/launcher/launcher_model_util.h |
@@ -0,0 +1,25 @@ |
+// Copyright 2013 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef ASH_LAUNCHER_LAUNCHER_MODEL_UTIL_H_ |
+#define ASH_LAUNCHER_LAUNCHER_MODEL_UTIL_H_ |
+ |
+#include "ash/ash_export.h" |
+#include "ash/launcher/launcher_types.h" |
+ |
+namespace ash { |
+ |
+class LauncherModel; |
+ |
+// Return the index of the |type| from a given |launcher_model|. |
+// Note: |
+// * If there are many items for |type| in the |launcher_model|, an index of |
+// first item will be returned. |
+// * If there is no item for |type|, -1 will be returned. |
+ASH_EXPORT int GetLauncherItemIndexForType(LauncherItemType type, |
+ const LauncherModel& launcher_model); |
+ |
+} // namespace ash |
+ |
+#endif // ASH_LAUNCHER_LAUNCHER_MODEL_UTIL_H_ |