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/apps_container_view.h" | 5 #include "ui/app_list/views/apps_container_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 app_list_folder_view_->ScheduleShowHideAnimation(false, true); | 187 app_list_folder_view_->ScheduleShowHideAnimation(false, true); |
188 apps_grid_view_->ScheduleShowHideAnimation(true); | 188 apps_grid_view_->ScheduleShowHideAnimation(true); |
189 break; | 189 break; |
190 default: | 190 default: |
191 NOTREACHED(); | 191 NOTREACHED(); |
192 } | 192 } |
193 | 193 |
194 Layout(); | 194 Layout(); |
195 } | 195 } |
196 | 196 |
197 Rects AppsContainerView::GetTopItemIconBoundsInActiveFolder() { | 197 std::vector<gfx::Rect> AppsContainerView::GetTopItemIconBoundsInActiveFolder() { |
198 // Get the active folder's icon bounds relative to AppsContainerView. | 198 // Get the active folder's icon bounds relative to AppsContainerView. |
199 AppListItemView* folder_item_view = | 199 AppListItemView* folder_item_view = |
200 apps_grid_view_->activated_folder_item_view(); | 200 apps_grid_view_->activated_folder_item_view(); |
201 gfx::Rect to_grid_view = folder_item_view->ConvertRectToParent( | 201 gfx::Rect to_grid_view = folder_item_view->ConvertRectToParent( |
202 folder_item_view->GetIconBounds()); | 202 folder_item_view->GetIconBounds()); |
203 gfx::Rect to_container = apps_grid_view_->ConvertRectToParent(to_grid_view); | 203 gfx::Rect to_container = apps_grid_view_->ConvertRectToParent(to_grid_view); |
204 | 204 |
205 return AppListFolderItem::GetTopIconsBounds(to_container); | 205 return AppListFolderItem::GetTopIconsBounds(to_container); |
206 } | 206 } |
207 | 207 |
(...skipping 27 matching lines...) Expand all Loading... |
235 void AppsContainerView::PrepareToShowApps(AppListFolderItem* folder_item) { | 235 void AppsContainerView::PrepareToShowApps(AppListFolderItem* folder_item) { |
236 if (folder_item) | 236 if (folder_item) |
237 CreateViewsForFolderTopItemsAnimation(folder_item, false); | 237 CreateViewsForFolderTopItemsAnimation(folder_item, false); |
238 | 238 |
239 // Hide the active folder item until the animation completes. | 239 // Hide the active folder item until the animation completes. |
240 if (apps_grid_view_->activated_folder_item_view()) | 240 if (apps_grid_view_->activated_folder_item_view()) |
241 apps_grid_view_->activated_folder_item_view()->SetVisible(false); | 241 apps_grid_view_->activated_folder_item_view()->SetVisible(false); |
242 } | 242 } |
243 | 243 |
244 } // namespace app_list | 244 } // namespace app_list |
OLD | NEW |