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

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: 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
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 2ecb29e51b0b0bfbf549ab59d15da5af6be50699..6b2a2892a66df17d813666290d68b89998734583 100644
--- a/ui/app_list/views/app_list_main_view.cc
+++ b/ui/app_list/views/app_list_main_view.cc
@@ -109,11 +109,14 @@ AppListMainView::AppListMainView(AppListViewDelegate* delegate,
}
void AppListMainView::AddContentsView() {
- contents_view_ = new ContentsView(this, model_, delegate_);
+ if (app_list::switches::IsExperimentalAppListEnabled())
+ contents_switcher_view_ = new ContentsSwitcherView();
+ contents_view_ =
+ new ContentsView(this, contents_switcher_view_, model_, delegate_);
calamity 2014/06/18 05:22:29 I think ContentsSwitcherView should take ContentsV
Matt Giuca 2014/06/18 06:47:02 Done. Good suggestion.
DCHECK_EQ(1, child_count());
AddChildView(contents_view_);
- if (app_list::switches::IsExperimentalAppListEnabled()) {
- contents_switcher_view_ = new ContentsSwitcherView(contents_view_);
+ if (contents_switcher_view_) {
+ contents_switcher_view_->Init(contents_view_);
AddChildView(contents_switcher_view_);
}
« no previous file with comments | « no previous file | ui/app_list/views/contents_switcher_view.h » ('j') | ui/app_list/views/contents_switcher_view.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698