Chromium Code Reviews| Index: ui/app_list/views/contents_view.cc |
| diff --git a/ui/app_list/views/contents_view.cc b/ui/app_list/views/contents_view.cc |
| index 1921aca0dc0872836b24e862c27610f887bd88ea..784f76b3d3833205086a443a5d3837093e3da999 100644 |
| --- a/ui/app_list/views/contents_view.cc |
| +++ b/ui/app_list/views/contents_view.cc |
| @@ -8,6 +8,7 @@ |
| #include "base/logging.h" |
| #include "ui/app_list/app_list_constants.h" |
| +#include "ui/app_list/app_list_switches.h" |
| #include "ui/app_list/app_list_view_delegate.h" |
| #include "ui/app_list/pagination_model.h" |
| #include "ui/app_list/views/app_list_main_view.h" |
| @@ -109,6 +110,31 @@ void ContentsView::CalculateIdealBounds() { |
| if (rect.IsEmpty()) |
| return; |
| + if (app_list::switches::IsExperimentalAppListEnabled()) { |
| + int incoming_view = 0; |
|
tapted
2014/03/05 07:37:17
nit: incoming_view_index or incoming_index
calamity
2014/03/07 00:30:51
Done.
|
| + switch (show_state_) { |
| + case SHOW_APPS: |
| + incoming_view = kIndexAppsContainer; |
| + break; |
| + case SHOW_SEARCH_RESULTS: |
| + incoming_view = kIndexSearchResults; |
| + break; |
| + default: |
| + NOTREACHED(); |
| + } |
| + |
| + gfx::Rect incoming_target(GetContentsBounds()); |
|
tapted
2014/03/05 07:37:17
nit: initialise these both with |rect|?
calamity
2014/03/07 00:30:51
Done.
|
| + gfx::Rect outgoing_target(GetContentsBounds()); |
| + outgoing_target.set_y(-outgoing_target.height()); |
| + |
| + for (int i = 0; i < view_model_->view_size(); ++i) { |
| + views::View* view = view_model_->view_at(i); |
|
tapted
2014/03/05 07:37:17
|view| unused?
calamity
2014/03/07 00:30:51
Done.
|
| + view_model_->set_ideal_bounds(i, i == incoming_view ? incoming_target |
| + : outgoing_target); |
| + } |
| + return; |
| + } |
| + |
| gfx::Rect container_frame(rect); |
| gfx::Rect results_frame(rect); |