summaryrefslogtreecommitdiffstats
path: root/ash/launcher/launcher_model_util.cc
blob: b1d63a4571adaf9105fa6df716fa20c122f9c532 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// 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.

#include "ash/launcher/launcher_model_util.h"

#include "ash/launcher/launcher_model.h"

namespace ash {

int GetLauncherItemIndexForType(LauncherItemType type,
                                const LauncherModel& launcher_model) {
  for (size_t i = 0; i < launcher_model.items().size(); i++) {
    if (launcher_model.items()[i].type == type)
      return i;
  }
  return -1;
}

}  // namespace ash