| 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 29 matching lines...) Expand all Loading... |
| 40 view_model_(new views::ViewModel), | 40 view_model_(new views::ViewModel), |
| 41 model_(model), | 41 model_(model), |
| 42 folder_item_(NULL), | 42 folder_item_(NULL), |
| 43 pagination_model_(new PaginationModel) { | 43 pagination_model_(new PaginationModel) { |
| 44 AddChildView(folder_header_view_); | 44 AddChildView(folder_header_view_); |
| 45 view_model_->Add(folder_header_view_, kIndexFolderHeader); | 45 view_model_->Add(folder_header_view_, kIndexFolderHeader); |
| 46 | 46 |
| 47 items_grid_view_ = new AppsGridView( | 47 items_grid_view_ = new AppsGridView( |
| 48 app_list_main_view, pagination_model_.get(), NULL); | 48 app_list_main_view, pagination_model_.get(), NULL); |
| 49 items_grid_view_->set_is_root_level(false); | 49 items_grid_view_->set_is_root_level(false); |
| 50 items_grid_view_->SetLayout(kPreferredIconDimension, | 50 items_grid_view_->SetLayout( |
| 51 kPreferredCols, | 51 kPreferredIconDimension, |
| 52 kPreferredRows); | 52 container_view->apps_grid_view()->cols(), |
| 53 container_view->apps_grid_view()->rows_per_page()); |
| 53 items_grid_view_->SetModel(model); | 54 items_grid_view_->SetModel(model); |
| 54 AddChildView(items_grid_view_); | 55 AddChildView(items_grid_view_); |
| 55 view_model_->Add(items_grid_view_, kIndexChildItems); | 56 view_model_->Add(items_grid_view_, kIndexChildItems); |
| 56 | 57 |
| 57 #if defined(USE_AURA) | 58 #if defined(USE_AURA) |
| 58 SetPaintToLayer(true); | 59 SetPaintToLayer(true); |
| 59 SetFillsBoundsOpaquely(false); | 60 SetFillsBoundsOpaquely(false); |
| 60 #endif | 61 #endif |
| 61 | 62 |
| 62 model_->item_list()->AddObserver(this); | 63 model_->item_list()->AddObserver(this); |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 | 165 |
| 165 return to_folder; | 166 return to_folder; |
| 166 } | 167 } |
| 167 | 168 |
| 168 void AppListFolderView::NavigateBack(AppListFolderItem* item, | 169 void AppListFolderView::NavigateBack(AppListFolderItem* item, |
| 169 const ui::Event& event_flags) { | 170 const ui::Event& event_flags) { |
| 170 container_view_->ShowApps(item); | 171 container_view_->ShowApps(item); |
| 171 } | 172 } |
| 172 | 173 |
| 173 } // namespace app_list | 174 } // namespace app_list |
| OLD | NEW |