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

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

Issue 214423002: Reset the app list when it is shown on Windows and Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix_app_list_folder_drag_for_real
Patch Set: fix app list folder icons disappearing on fast switch Created 6 years, 9 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
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"
11 11
12 namespace content { 12 namespace content {
13 class WebContents; 13 class WebContents;
14 } 14 }
15 15
16 namespace app_list { 16 namespace app_list {
17 17
18 class AppsGridView; 18 class AppsGridView;
19 class ApplicationDragAndDropHost; 19 class ApplicationDragAndDropHost;
20 class AppListFolderItem; 20 class AppListFolderItem;
21 class AppListFolderView; 21 class AppListFolderView;
22 class AppListItemView;
22 class AppListMainView; 23 class AppListMainView;
23 class AppListModel; 24 class AppListModel;
24 class ContentsView; 25 class ContentsView;
25 class FolderBackgroundView; 26 class FolderBackgroundView;
26 class PaginationModel; 27 class PaginationModel;
27 28
28 // AppsContainerView contains a root level AppsGridView to render the root level 29 // AppsContainerView contains a root level AppsGridView to render the root level
29 // app items, and a AppListFolderView to render the app items inside the 30 // app items, and a AppListFolderView to render the app items inside the
30 // active folder. Only one if them is visible to user at any time. 31 // active folder. Only one if them is visible to user at any time.
31 class AppsContainerView : public views::View, 32 class AppsContainerView : public views::View,
32 public TopIconAnimationObserver { 33 public TopIconAnimationObserver {
33 public: 34 public:
34 AppsContainerView(AppListMainView* app_list_main_view, 35 AppsContainerView(AppListMainView* app_list_main_view,
35 PaginationModel* pagination_model, 36 PaginationModel* pagination_model,
36 AppListModel* model, 37 AppListModel* model,
37 content::WebContents* start_page_contents); 38 content::WebContents* start_page_contents);
38 virtual ~AppsContainerView(); 39 virtual ~AppsContainerView();
39 40
40 // Shows the active folder content specified by |folder_item|. 41 // Shows the active folder content specified by |folder_item|.
41 void ShowActiveFolder(AppListFolderItem* folder_item); 42 void ShowActiveFolder(AppListFolderItem* folder_item);
42 43
43 // Shows the root level apps list. This is called when UI navigate back from 44 // Shows the root level apps list. This is called when UI navigate back from
44 // a folder view with |folder_item|. If |folder_item| is NULL skips animation. 45 // a folder view with |folder_item|. If |folder_item| is NULL skips animation.
45 void ShowApps(AppListFolderItem* folder_item); 46 void ShowApps(AppListFolderItem* folder_item);
46 47
48 void ResetForShow();
49
47 // Sets |drag_and_drop_host_| for the current app list in both 50 // Sets |drag_and_drop_host_| for the current app list in both
48 // app_list_folder_view_ and root level apps_grid_view_. 51 // app_list_folder_view_ and root level apps_grid_view_.
49 void SetDragAndDropHostOfCurrentAppList( 52 void SetDragAndDropHostOfCurrentAppList(
50 ApplicationDragAndDropHost* drag_and_drop_host); 53 ApplicationDragAndDropHost* drag_and_drop_host);
51 54
52 // Transits the UI from folder view to root lelve apps grid view when 55 // Transits the UI from folder view to root lelve apps grid view when
53 // re-parenting a child item of |folder_item|. 56 // re-parenting a child item of |folder_item|.
54 void ReparentFolderItemTransit(AppListFolderItem* folder_item); 57 void ReparentFolderItemTransit(AppListFolderItem* folder_item);
55 58
56 // views::View overrides: 59 // views::View overrides:
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 AppListFolderItem* active_folder, bool open_folder); 91 AppListFolderItem* active_folder, bool open_folder);
89 92
90 void PrepareToShowApps(AppListFolderItem* folder_item); 93 void PrepareToShowApps(AppListFolderItem* folder_item);
91 94
92 AppListModel* model_; 95 AppListModel* model_;
93 AppsGridView* apps_grid_view_; // Owned by views hierarchy. 96 AppsGridView* apps_grid_view_; // Owned by views hierarchy.
94 AppListFolderView* app_list_folder_view_; // Owned by views hierarchy. 97 AppListFolderView* app_list_folder_view_; // Owned by views hierarchy.
95 FolderBackgroundView* folder_background_view_; // Owned by views hierarchy. 98 FolderBackgroundView* folder_background_view_; // Owned by views hierarchy.
96 ShowState show_state_; 99 ShowState show_state_;
97 100
101 // The currently active folder view, if any.
102 AppListItemView* activated_folder_view_;
tapted 2014/03/27 11:04:52 This raw pointer scares me a little - AppListItemV
calamity 2014/03/28 03:43:27 Removed.
103
98 // The transitional views for animating the top items in folder 104 // The transitional views for animating the top items in folder
99 // when opening or closing a folder. 105 // when opening or closing a folder.
100 std::vector<views::View*> top_icon_views_; 106 std::vector<views::View*> top_icon_views_;
101 107
102 size_t top_icon_animation_pending_count_; 108 size_t top_icon_animation_pending_count_;
103 109
104 DISALLOW_COPY_AND_ASSIGN(AppsContainerView); 110 DISALLOW_COPY_AND_ASSIGN(AppsContainerView);
105 }; 111 };
106 112
107 } // namespace app_list 113 } // namespace app_list
108 114
109 115
110 #endif // UI_APP_LIST_VIEWS_APPS_CONTAINER_VIEW_H_ 116 #endif // UI_APP_LIST_VIEWS_APPS_CONTAINER_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698