OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/app_list/views/app_list_main_view.h" | 5 #include "ui/app_list/views/app_list_main_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 pagination_model->SelectPage(initial_apps_page, false); | 132 pagination_model->SelectPage(initial_apps_page, false); |
133 | 133 |
134 // Starts icon loading early. | 134 // Starts icon loading early. |
135 PreloadIcons(parent); | 135 PreloadIcons(parent); |
136 } | 136 } |
137 | 137 |
138 void AppListMainView::AddContentsViews() { | 138 void AppListMainView::AddContentsViews() { |
139 contents_view_ = new ContentsView(this); | 139 contents_view_ = new ContentsView(this); |
140 if (app_list::switches::IsExperimentalAppListEnabled()) { | 140 if (app_list::switches::IsExperimentalAppListEnabled()) { |
141 contents_switcher_view_ = new ContentsSwitcherView(contents_view_); | 141 contents_switcher_view_ = new ContentsSwitcherView(contents_view_); |
142 contents_view_->set_contents_switcher_view(contents_switcher_view_); | 142 contents_view_->SetContentsSwitcherView(contents_switcher_view_); |
143 } | 143 } |
144 contents_view_->InitNamedPages(model_, delegate_); | 144 contents_view_->InitNamedPages(model_, delegate_); |
145 AddChildView(contents_view_); | 145 AddChildView(contents_view_); |
146 if (contents_switcher_view_) | 146 if (contents_switcher_view_) |
147 AddChildView(contents_switcher_view_); | 147 AddChildView(contents_switcher_view_); |
148 | 148 |
149 search_box_view_->set_contents_view(contents_view_); | 149 search_box_view_->set_contents_view(contents_view_); |
150 | 150 |
151 contents_view_->SetPaintToLayer(true); | 151 contents_view_->SetPaintToLayer(true); |
152 contents_view_->SetFillsBoundsOpaquely(false); | 152 contents_view_->SetFillsBoundsOpaquely(false); |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 // Resubmit the query via a posted task so that all observers for the | 325 // Resubmit the query via a posted task so that all observers for the |
326 // uninstall notification are notified. | 326 // uninstall notification are notified. |
327 base::MessageLoop::current()->PostTask( | 327 base::MessageLoop::current()->PostTask( |
328 FROM_HERE, | 328 FROM_HERE, |
329 base::Bind(&AppListMainView::QueryChanged, | 329 base::Bind(&AppListMainView::QueryChanged, |
330 weak_ptr_factory_.GetWeakPtr(), | 330 weak_ptr_factory_.GetWeakPtr(), |
331 search_box_view_)); | 331 search_box_view_)); |
332 } | 332 } |
333 | 333 |
334 } // namespace app_list | 334 } // namespace app_list |
OLD | NEW |