| 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/accessibility/ax_view_state.h" | 9 #include "ui/accessibility/ax_view_state.h" |
| 10 #include "ui/app_list/app_list_constants.h" | 10 #include "ui/app_list/app_list_constants.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 const int kOutOfFolderContainerBubbleDelta = 30; | 40 const int kOutOfFolderContainerBubbleDelta = 30; |
| 41 | 41 |
| 42 } // namespace | 42 } // namespace |
| 43 | 43 |
| 44 AppListFolderView::AppListFolderView(AppsContainerView* container_view, | 44 AppListFolderView::AppListFolderView(AppsContainerView* container_view, |
| 45 AppListModel* model, | 45 AppListModel* model, |
| 46 AppListMainView* app_list_main_view) | 46 AppListMainView* app_list_main_view) |
| 47 : container_view_(container_view), | 47 : container_view_(container_view), |
| 48 app_list_main_view_(app_list_main_view), | 48 app_list_main_view_(app_list_main_view), |
| 49 folder_header_view_(new FolderHeaderView(this)), | 49 folder_header_view_(new FolderHeaderView(this)), |
| 50 view_model_(new views::ViewModel), | 50 view_model_(new views::ViewModel<views::View>), |
| 51 model_(model), | 51 model_(model), |
| 52 folder_item_(NULL), | 52 folder_item_(NULL), |
| 53 hide_for_reparent_(false) { | 53 hide_for_reparent_(false) { |
| 54 AddChildView(folder_header_view_); | 54 AddChildView(folder_header_view_); |
| 55 view_model_->Add(folder_header_view_, kIndexFolderHeader); | 55 view_model_->Add(folder_header_view_, kIndexFolderHeader); |
| 56 | 56 |
| 57 items_grid_view_ = new AppsGridView(app_list_main_view_); | 57 items_grid_view_ = new AppsGridView(app_list_main_view_); |
| 58 items_grid_view_->set_folder_delegate(this); | 58 items_grid_view_->set_folder_delegate(this); |
| 59 items_grid_view_->SetLayout( | 59 items_grid_view_->SetLayout( |
| 60 container_view->apps_grid_view()->cols(), | 60 container_view->apps_grid_view()->cols(), |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 void AppListFolderView::GiveBackFocusToSearchBox() { | 312 void AppListFolderView::GiveBackFocusToSearchBox() { |
| 313 app_list_main_view_->search_box_view()->search_box()->RequestFocus(); | 313 app_list_main_view_->search_box_view()->search_box()->RequestFocus(); |
| 314 } | 314 } |
| 315 | 315 |
| 316 void AppListFolderView::SetItemName(AppListFolderItem* item, | 316 void AppListFolderView::SetItemName(AppListFolderItem* item, |
| 317 const std::string& name) { | 317 const std::string& name) { |
| 318 model_->SetItemName(item, name); | 318 model_->SetItemName(item, name); |
| 319 } | 319 } |
| 320 | 320 |
| 321 } // namespace app_list | 321 } // namespace app_list |
| OLD | NEW |