| Index: ui/aura_shell/app_list/app_list_item_group_model.h
|
| diff --git a/ui/aura_shell/app_list/app_list_item_group_model.h b/ui/aura_shell/app_list/app_list_item_group_model.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..6476742462cfcbab9efdbbd7ba30a04c66529028
|
| --- /dev/null
|
| +++ b/ui/aura_shell/app_list/app_list_item_group_model.h
|
| @@ -0,0 +1,46 @@
|
| +// Copyright (c) 2011 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 UI_AURA_SHELL_APP_LIST_APP_LIST_ITEM_GROUP_MODEL_H_
|
| +#define UI_AURA_SHELL_APP_LIST_APP_LIST_ITEM_GROUP_MODEL_H_
|
| +#pragma once
|
| +
|
| +#include <string>
|
| +
|
| +#include "base/basictypes.h"
|
| +#include "ui/aura_shell/app_list/app_list_item_model.h"
|
| +#include "ui/aura_shell/aura_shell_export.h"
|
| +#include "ui/base/models/list_model.h"
|
| +
|
| +namespace aura_shell {
|
| +
|
| +// AppListItemGroupModel holds a list of AppListItemModels.
|
| +class AURA_SHELL_EXPORT AppListItemGroupModel {
|
| + public:
|
| + typedef ui::ListModel<AppListItemModel> Items;
|
| +
|
| + explicit AppListItemGroupModel(const std::string& title);
|
| + virtual ~AppListItemGroupModel();
|
| +
|
| + void AddItem(AppListItemModel* item);
|
| + AppListItemModel* GetItem(int index);
|
| +
|
| + const std::string& title() const {
|
| + return title_;
|
| + }
|
| +
|
| + int item_count() const {
|
| + return items_.item_count();
|
| + }
|
| +
|
| + private:
|
| + const std::string title_;
|
| + Items items_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(AppListItemGroupModel);
|
| +};
|
| +
|
| +} // namespace aura_shell
|
| +
|
| +#endif // UI_AURA_SHELL_APP_LIST_APP_LIST_ITEM_GROUP_MODEL_H_
|
|
|