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

Unified Diff: ash/shell/app_list.cc

Issue 27438002: Store AppItems as pages in AppListModel. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 7 years, 2 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
Index: ash/shell/app_list.cc
diff --git a/ash/shell/app_list.cc b/ash/shell/app_list.cc
index 7448de447587175f3a8dbfc7aa39fcc0f53e7b1f..6768a677ee90c61ca9a493b378185c327d875932 100644
--- a/ash/shell/app_list.cc
+++ b/ash/shell/app_list.cc
@@ -195,14 +195,14 @@ class ExampleAppListViewDelegate : public app_list::AppListViewDelegate {
ExampleAppListViewDelegate() : model_(NULL) {}
private:
- void PopulateApps(app_list::AppListModel::Apps* apps) {
+ void PopulateApps() {
for (int i = 0;
i < static_cast<int>(WindowTypeLauncherItem::LAST_TYPE);
++i) {
WindowTypeLauncherItem::Type type =
static_cast<WindowTypeLauncherItem::Type>(i);
std::string id = base::StringPrintf("%d", i);
- apps->Add(new WindowTypeLauncherItem(id, type));
+ model_->AddItem(new WindowTypeLauncherItem(id, type));
}
}
@@ -233,7 +233,7 @@ class ExampleAppListViewDelegate : public app_list::AppListViewDelegate {
virtual void InitModel(app_list::AppListModel* model) OVERRIDE {
model_ = model;
- PopulateApps(model_->apps());
+ PopulateApps();
DecorateSearchBox(model_->search_box());
}
« no previous file with comments | « no previous file | chrome/browser/ui/app_list/extension_app_model_builder.cc » ('j') | ui/app_list/app_list_item_model.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698