Allow comments in extension config files.
[chromium-blink-merge.git] / ash / app_list / app_list_item_group_model.h
blob665f4a1b41faf76c8c569600eeca1efab4bfbb15
1 // Copyright (c) 2011 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.
5 #ifndef ASH_APP_LIST_APP_LIST_ITEM_GROUP_MODEL_H_
6 #define ASH_APP_LIST_APP_LIST_ITEM_GROUP_MODEL_H_
7 #pragma once
9 #include <string>
11 #include "ash/app_list/app_list_item_model.h"
12 #include "base/basictypes.h"
13 #include "ash/ash_export.h"
14 #include "ui/base/models/list_model.h"
16 namespace ash {
18 // AppListItemGroupModel holds a list of AppListItemModels.
19 class ASH_EXPORT AppListItemGroupModel {
20 public:
21 typedef ui::ListModel<AppListItemModel> Items;
23 explicit AppListItemGroupModel(const std::string& title);
24 virtual ~AppListItemGroupModel();
26 void AddItem(AppListItemModel* item);
27 AppListItemModel* GetItem(int index);
29 const std::string& title() const {
30 return title_;
33 int item_count() const {
34 return items_.item_count();
37 private:
38 const std::string title_;
39 Items items_;
41 DISALLOW_COPY_AND_ASSIGN(AppListItemGroupModel);
44 } // namespace ash
46 #endif // ASH_APP_LIST_APP_LIST_ITEM_GROUP_MODEL_H_