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

Unified Diff: ash/app_list/app_list_model.h

Issue 9559005: aura: Implement app list M19 mock. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use a better way to get ceiling Created 8 years, 10 months 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/app_list/app_list_item_view_listener.h ('k') | ash/app_list/app_list_model.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/app_list/app_list_model.h
diff --git a/ash/app_list/app_list_model.h b/ash/app_list/app_list_model.h
index bb797a16e4f6a0787842c21a3b4ff4ab3b10bf8e..fbced97aafb1ea63a330011d02307a3b0e061929 100644
--- a/ash/app_list/app_list_model.h
+++ b/ash/app_list/app_list_model.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 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.
@@ -6,32 +6,36 @@
#define ASH_APP_LIST_APP_LIST_MODEL_H_
#pragma once
-#include "ash/app_list/app_list_item_group_model.h"
#include "base/basictypes.h"
+#include "ash/app_list/app_list_item_model.h"
#include "ash/ash_export.h"
#include "ui/base/models/list_model.h"
namespace ash {
-// Model for AppListView. It is consisted of a list of AppListItemGroupModels,
-// which in turn owns a list of AppListItemModels.
+class AppListItemModel;
+
+// Model for AppListModelView that owns a list of AppListItemModels.
class ASH_EXPORT AppListModel {
public:
AppListModel();
virtual ~AppListModel();
- void AddGroup(AppListItemGroupModel* group);
- AppListItemGroupModel* GetGroup(int index);
+ // Adds an item to the model. The model takes ownership of |item|.
+ void AddItem(AppListItemModel* item);
+
+ AppListItemModel* GetItem(int index);
void AddObserver(ui::ListModelObserver* observer);
void RemoveObserver(ui::ListModelObserver* observer);
- int group_count() const {
- return groups_.item_count();
+ int item_count() const {
+ return items_.item_count();
}
private:
- ui::ListModel<AppListItemGroupModel> groups_;
+ typedef ui::ListModel<AppListItemModel> Items;
+ Items items_;
DISALLOW_COPY_AND_ASSIGN(AppListModel);
};
« no previous file with comments | « ash/app_list/app_list_item_view_listener.h ('k') | ash/app_list/app_list_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698