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 1e299d706a7abd58dcb2d8cb63ac79bbe2cb4f2a..5186efe622256f0fe260a7a2a5c553f74f8f6cc7 100644 |
--- a/ui/app_list/views/contents_view.cc |
+++ b/ui/app_list/views/contents_view.cc |
@@ -370,7 +370,8 @@ gfx::Rect ContentsView::GetSearchBoxBoundsForState( |
// Convert to ContentsView space, assuming that the StartPageView is in the |
// ContentsView's default bounds. |
return start_page_view_->GetSearchBoxBounds() + |
- GetDefaultContentsBounds().OffsetFromOrigin(); |
+ default_animator_->GetOnscreenPageBounds(GetPageIndexForState(state)) |
+ .OffsetFromOrigin(); |
} |
return GetDefaultSearchBoxBounds(); |
@@ -459,14 +460,10 @@ void ContentsView::Layout() { |
// Move the current view onto the screen, and all other views off screen to |
// the left. (Since we are not animating, we don't need to be careful about |
// which side we place the off-screen views onto.) |
- gfx::Rect rect(GetDefaultContentsBounds()); |
- // Custom pages are aligned to the top of the window, not under the search |
- // box. |
- double progress = 0; |
- if (IsStateActive(AppListModel::STATE_CUSTOM_LAUNCHER_PAGE)) { |
- rect = GetContentsBounds(); |
- progress = 1; |
- } |
+ gfx::Rect rect = |
+ default_animator_->GetOnscreenPageBounds(GetActivePageIndex()); |
+ double progress = |
+ IsStateActive(AppListModel::STATE_CUSTOM_LAUNCHER_PAGE) ? 1 : 0; |
// Notify the custom launcher page that the active page has changed. |
app_list_main_view_->view_delegate()->CustomLauncherPageAnimationChanged( |