Chromium Code Reviews| 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_); |
| } |