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

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

Issue 220393003: Add a unit test for resetting the app list on a reshow. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@trent_whole_app_list_unit_test
Patch Set: remove APP_LIST_EXPORTs Created 6 years, 7 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 #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 25 matching lines...) Expand all
36 rows = kExperimentalPreferredRows; 36 rows = kExperimentalPreferredRows;
37 } 37 }
38 apps_grid_view_->SetLayout(kPreferredIconDimension, cols, rows); 38 apps_grid_view_->SetLayout(kPreferredIconDimension, cols, rows);
39 AddChildView(apps_grid_view_); 39 AddChildView(apps_grid_view_);
40 40
41 folder_background_view_ = new FolderBackgroundView(); 41 folder_background_view_ = new FolderBackgroundView();
42 AddChildView(folder_background_view_); 42 AddChildView(folder_background_view_);
43 43
44 app_list_folder_view_ = 44 app_list_folder_view_ =
45 new AppListFolderView(this, model, app_list_main_view); 45 new AppListFolderView(this, model, app_list_main_view);
46 // The folder view is initially hidden.
47 app_list_folder_view_->SetVisible(false);
46 AddChildView(app_list_folder_view_); 48 AddChildView(app_list_folder_view_);
47 49
48 apps_grid_view_->SetModel(model_); 50 apps_grid_view_->SetModel(model_);
49 apps_grid_view_->SetItemList(model_->top_level_item_list()); 51 apps_grid_view_->SetItemList(model_->top_level_item_list());
50 SetShowState(SHOW_APPS, 52 SetShowState(SHOW_APPS,
51 false); /* show apps without animation */ 53 false); /* show apps without animation */
52 } 54 }
53 55
54 AppsContainerView::~AppsContainerView() { 56 AppsContainerView::~AppsContainerView() {
55 } 57 }
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 void AppsContainerView::PrepareToShowApps(AppListFolderItem* folder_item) { 228 void AppsContainerView::PrepareToShowApps(AppListFolderItem* folder_item) {
227 if (folder_item) 229 if (folder_item)
228 CreateViewsForFolderTopItemsAnimation(folder_item, false); 230 CreateViewsForFolderTopItemsAnimation(folder_item, false);
229 231
230 // Hide the active folder item until the animation completes. 232 // Hide the active folder item until the animation completes.
231 if (apps_grid_view_->activated_item_view()) 233 if (apps_grid_view_->activated_item_view())
232 apps_grid_view_->activated_item_view()->SetVisible(false); 234 apps_grid_view_->activated_item_view()->SetVisible(false);
233 } 235 }
234 236
235 } // namespace app_list 237 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698