| 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 #ifndef UI_APP_LIST_VIEWS_APPS_CONTAINER_VIEW_H_ | 5 #ifndef UI_APP_LIST_VIEWS_APPS_CONTAINER_VIEW_H_ |
| 6 #define UI_APP_LIST_VIEWS_APPS_CONTAINER_VIEW_H_ | 6 #define UI_APP_LIST_VIEWS_APPS_CONTAINER_VIEW_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ui/app_list/app_list_folder_item.h" | 10 #include "ui/app_list/app_list_folder_item.h" |
| 11 #include "ui/app_list/views/top_icon_animation_view.h" | 11 #include "ui/app_list/views/top_icon_animation_view.h" |
| 12 #include "ui/views/view.h" | 12 #include "ui/views/view.h" |
| 13 | 13 |
| 14 namespace gfx { |
| 15 class Rect; |
| 16 } |
| 17 |
| 14 namespace app_list { | 18 namespace app_list { |
| 15 | 19 |
| 16 class AppsGridView; | 20 class AppsGridView; |
| 17 class ApplicationDragAndDropHost; | 21 class ApplicationDragAndDropHost; |
| 18 class AppListFolderItem; | 22 class AppListFolderItem; |
| 19 class AppListFolderView; | 23 class AppListFolderView; |
| 20 class AppListMainView; | 24 class AppListMainView; |
| 21 class AppListModel; | 25 class AppListModel; |
| 22 class ContentsView; | 26 class ContentsView; |
| 23 class FolderBackgroundView; | 27 class FolderBackgroundView; |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 SHOW_ACTIVE_FOLDER, | 82 SHOW_ACTIVE_FOLDER, |
| 79 SHOW_ITEM_REPARENT, | 83 SHOW_ITEM_REPARENT, |
| 80 }; | 84 }; |
| 81 | 85 |
| 82 void SetShowState(ShowState show_state, bool show_apps_with_animation); | 86 void SetShowState(ShowState show_state, bool show_apps_with_animation); |
| 83 | 87 |
| 84 // Calculates the top item icon bounds in the active folder icon. The bounds | 88 // Calculates the top item icon bounds in the active folder icon. The bounds |
| 85 // is relative to AppsContainerView. | 89 // is relative to AppsContainerView. |
| 86 // Returns the bounds of top items' icon in sequence of top left, top right, | 90 // Returns the bounds of top items' icon in sequence of top left, top right, |
| 87 // bottom left, bottom right. | 91 // bottom left, bottom right. |
| 88 Rects GetTopItemIconBoundsInActiveFolder(); | 92 std::vector<gfx::Rect> GetTopItemIconBoundsInActiveFolder(); |
| 89 | 93 |
| 90 // Creates the transitional views for animating the top items in the folder | 94 // Creates the transitional views for animating the top items in the folder |
| 91 // when opening or closing a folder. | 95 // when opening or closing a folder. |
| 92 void CreateViewsForFolderTopItemsAnimation( | 96 void CreateViewsForFolderTopItemsAnimation( |
| 93 AppListFolderItem* active_folder, bool open_folder); | 97 AppListFolderItem* active_folder, bool open_folder); |
| 94 | 98 |
| 95 void PrepareToShowApps(AppListFolderItem* folder_item); | 99 void PrepareToShowApps(AppListFolderItem* folder_item); |
| 96 | 100 |
| 97 AppListModel* model_; | 101 AppListModel* model_; |
| 98 AppsGridView* apps_grid_view_; // Owned by views hierarchy. | 102 AppsGridView* apps_grid_view_; // Owned by views hierarchy. |
| 99 AppListFolderView* app_list_folder_view_; // Owned by views hierarchy. | 103 AppListFolderView* app_list_folder_view_; // Owned by views hierarchy. |
| 100 FolderBackgroundView* folder_background_view_; // Owned by views hierarchy. | 104 FolderBackgroundView* folder_background_view_; // Owned by views hierarchy. |
| 101 ShowState show_state_; | 105 ShowState show_state_; |
| 102 | 106 |
| 103 // The transitional views for animating the top items in folder | 107 // The transitional views for animating the top items in folder |
| 104 // when opening or closing a folder. | 108 // when opening or closing a folder. |
| 105 std::vector<views::View*> top_icon_views_; | 109 std::vector<views::View*> top_icon_views_; |
| 106 | 110 |
| 107 size_t top_icon_animation_pending_count_; | 111 size_t top_icon_animation_pending_count_; |
| 108 | 112 |
| 109 DISALLOW_COPY_AND_ASSIGN(AppsContainerView); | 113 DISALLOW_COPY_AND_ASSIGN(AppsContainerView); |
| 110 }; | 114 }; |
| 111 | 115 |
| 112 } // namespace app_list | 116 } // namespace app_list |
| 113 | 117 |
| 114 | 118 |
| 115 #endif // UI_APP_LIST_VIEWS_APPS_CONTAINER_VIEW_H_ | 119 #endif // UI_APP_LIST_VIEWS_APPS_CONTAINER_VIEW_H_ |
| OLD | NEW |