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/app_list_folder_view.h" | 5 #include "ui/app_list/views/app_list_folder_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "ui/app_list/app_list_constants.h" | 9 #include "ui/app_list/app_list_constants.h" |
10 #include "ui/app_list/app_list_folder_item.h" | 10 #include "ui/app_list/app_list_folder_item.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 model_(model), | 48 model_(model), |
49 folder_item_(NULL), | 49 folder_item_(NULL), |
50 pagination_model_(new PaginationModel), | 50 pagination_model_(new PaginationModel), |
51 hide_for_reparent_(false) { | 51 hide_for_reparent_(false) { |
52 AddChildView(folder_header_view_); | 52 AddChildView(folder_header_view_); |
53 view_model_->Add(folder_header_view_, kIndexFolderHeader); | 53 view_model_->Add(folder_header_view_, kIndexFolderHeader); |
54 | 54 |
55 items_grid_view_ = new AppsGridView( | 55 items_grid_view_ = new AppsGridView( |
56 app_list_main_view, pagination_model_.get(), NULL); | 56 app_list_main_view, pagination_model_.get(), NULL); |
57 items_grid_view_->set_is_root_level(false); | 57 items_grid_view_->set_is_root_level(false); |
58 items_grid_view_->SetLayout(kPreferredIconDimension, | 58 items_grid_view_->SetLayout( |
59 kPreferredCols, | 59 kPreferredIconDimension, |
60 kPreferredRows); | 60 container_view->apps_grid_view()->cols(), |
| 61 container_view->apps_grid_view()->rows_per_page()); |
61 items_grid_view_->SetModel(model); | 62 items_grid_view_->SetModel(model); |
62 AddChildView(items_grid_view_); | 63 AddChildView(items_grid_view_); |
63 view_model_->Add(items_grid_view_, kIndexChildItems); | 64 view_model_->Add(items_grid_view_, kIndexChildItems); |
64 | 65 |
65 #if defined(USE_AURA) | 66 #if defined(USE_AURA) |
66 SetPaintToLayer(true); | 67 SetPaintToLayer(true); |
67 SetFillsBoundsOpaquely(false); | 68 SetFillsBoundsOpaquely(false); |
68 #endif | 69 #endif |
69 | 70 |
70 model_->item_list()->AddObserver(this); | 71 model_->item_list()->AddObserver(this); |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 SetVisible(false); | 275 SetVisible(false); |
275 hide_for_reparent_ = false; | 276 hide_for_reparent_ = false; |
276 } | 277 } |
277 | 278 |
278 void AppListFolderView::NavigateBack(AppListFolderItem* item, | 279 void AppListFolderView::NavigateBack(AppListFolderItem* item, |
279 const ui::Event& event_flags) { | 280 const ui::Event& event_flags) { |
280 container_view_->ShowApps(item); | 281 container_view_->ShowApps(item); |
281 } | 282 } |
282 | 283 |
283 } // namespace app_list | 284 } // namespace app_list |
OLD | NEW |