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

Unified Diff: ui/app_list/views/app_list_main_view.cc

Issue 336313010: App List: Refactor ContentsSwitcherView so it doesn't hard-code pages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 6 years, 6 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 | « no previous file | ui/app_list/views/contents_switcher_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/views/app_list_main_view.cc
diff --git a/ui/app_list/views/app_list_main_view.cc b/ui/app_list/views/app_list_main_view.cc
index 9837ae2a2d7c275e971506d4e99cedd675662aca..177946d885340d66a83190f9f95200c296ef2e6c 100644
--- a/ui/app_list/views/app_list_main_view.cc
+++ b/ui/app_list/views/app_list_main_view.cc
@@ -109,12 +109,15 @@ AppListMainView::AppListMainView(AppListViewDelegate* delegate,
}
void AppListMainView::AddContentsViews() {
- contents_view_ = new ContentsView(this, model_, delegate_);
- AddChildView(contents_view_);
+ contents_view_ = new ContentsView(this);
if (app_list::switches::IsExperimentalAppListEnabled()) {
contents_switcher_view_ = new ContentsSwitcherView(contents_view_);
- AddChildView(contents_switcher_view_);
+ contents_view_->set_contents_switcher_view(contents_switcher_view_);
}
+ contents_view_->InitNamedPages(model_, delegate_);
+ AddChildView(contents_view_);
+ if (contents_switcher_view_)
+ AddChildView(contents_switcher_view_);
search_box_view_->set_contents_view(contents_view_);
« no previous file with comments | « no previous file | ui/app_list/views/contents_switcher_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698