Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Side by Side Diff: ui/app_list/views/apps_container_view.h

Issue 163953008: Remove the animation delay for showing the top level apps when user opens app list launcher. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "ui/app_list/app_list_folder_item.h" 8 #include "ui/app_list/app_list_folder_item.h"
9 #include "ui/app_list/views/top_icon_animation_view.h" 9 #include "ui/app_list/views/top_icon_animation_view.h"
10 #include "ui/views/view.h" 10 #include "ui/views/view.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 } 67 }
68 AppListFolderView* app_list_folder_view() { return app_list_folder_view_; } 68 AppListFolderView* app_list_folder_view() { return app_list_folder_view_; }
69 69
70 private: 70 private:
71 enum ShowState { 71 enum ShowState {
72 SHOW_APPS, 72 SHOW_APPS,
73 SHOW_ACTIVE_FOLDER, 73 SHOW_ACTIVE_FOLDER,
74 SHOW_ITEM_REPARENT, 74 SHOW_ITEM_REPARENT,
75 }; 75 };
76 76
77 void SetShowState(ShowState show_state); 77 void SetShowState(ShowState show_state, bool show_apps_with_animation);
78 78
79 // Calculates the top item icon bounds in the active folder icon. The bounds 79 // Calculates the top item icon bounds in the active folder icon. The bounds
80 // is relative to AppsContainerView. 80 // is relative to AppsContainerView.
81 // Returns the bounds of top items' icon in sequence of top left, top right, 81 // Returns the bounds of top items' icon in sequence of top left, top right,
82 // bottom left, bottom right. 82 // bottom left, bottom right.
83 Rects GetTopItemIconBoundsInActiveFolder(); 83 Rects GetTopItemIconBoundsInActiveFolder();
84 84
85 // Creates the transitional views for animating the top items in the folder 85 // Creates the transitional views for animating the top items in the folder
86 // when opening or closing a folder. 86 // when opening or closing a folder.
87 void CreateViewsForFolderTopItemsAnimation( 87 void CreateViewsForFolderTopItemsAnimation(
88 AppListFolderItem* active_folder, bool open_folder); 88 AppListFolderItem* active_folder, bool open_folder);
89 89
90 void PrepareToShowApps(AppListFolderItem* folder_item); 90 void PrepareToShowApps(AppListFolderItem* folder_item);
91 91
92 AppListModel* model_; 92 AppListModel* model_;
93 AppsGridView* apps_grid_view_; // Owned by views hierarchy. 93 AppsGridView* apps_grid_view_; // Owned by views hierarchy.
94 AppListFolderView* app_list_folder_view_; // Owned by views hierarchy. 94 AppListFolderView* app_list_folder_view_; // Owned by views hierarchy.
95 FolderBackgroundView* folder_background_view_; // Owned by views hierarchy. 95 FolderBackgroundView* folder_background_view_; // Owned by views hierarchy.
96 ShowState show_state_; 96 ShowState show_state_;
97 97
98 // The transitional views for animating the top items in folder 98 // The transitional views for animating the top items in folder
99 // when opening or closing a folder. 99 // when opening or closing a folder.
100 std::vector<views::View*> top_icon_views_; 100 std::vector<views::View*> top_icon_views_;
101 101
102 size_t top_icon_animation_pending_count_; 102 size_t top_icon_animation_pending_count_;
103 103
104 // If true, shows top level apps with animation.
105 // Otherwise, do not animate the UI change.
106 bool show_apps_with_animation_;
107
104 DISALLOW_COPY_AND_ASSIGN(AppsContainerView); 108 DISALLOW_COPY_AND_ASSIGN(AppsContainerView);
105 }; 109 };
106 110
107 } // namespace app_list 111 } // namespace app_list
108 112
109 113
110 #endif // UI_APP_LIST_VIEWS_APPS_CONTAINER_VIEW_H_ 114 #endif // UI_APP_LIST_VIEWS_APPS_CONTAINER_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698