| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 items_grid_view_->SetLayout( | 59 items_grid_view_->SetLayout( |
| 60 container_view->apps_grid_view()->cols(), | 60 container_view->apps_grid_view()->cols(), |
| 61 container_view->apps_grid_view()->rows_per_page()); | 61 container_view->apps_grid_view()->rows_per_page()); |
| 62 items_grid_view_->SetModel(model); | 62 items_grid_view_->SetModel(model); |
| 63 AddChildView(items_grid_view_); | 63 AddChildView(items_grid_view_); |
| 64 view_model_->Add(items_grid_view_, kIndexChildItems); | 64 view_model_->Add(items_grid_view_, kIndexChildItems); |
| 65 | 65 |
| 66 SetPaintToLayer(true); | 66 SetPaintToLayer(true); |
| 67 SetFillsBoundsOpaquely(false); | 67 SetFillsBoundsOpaquely(false); |
| 68 | 68 |
| 69 DLOG(ERROR) << "folderview"; |
| 69 model_->AddObserver(this); | 70 model_->AddObserver(this); |
| 70 } | 71 } |
| 71 | 72 |
| 72 AppListFolderView::~AppListFolderView() { | 73 AppListFolderView::~AppListFolderView() { |
| 73 model_->RemoveObserver(this); | 74 model_->RemoveObserver(this); |
| 74 | 75 |
| 75 // This prevents the AppsGridView's destructor from calling the now-deleted | 76 // This prevents the AppsGridView's destructor from calling the now-deleted |
| 76 // AppListFolderView's methods if a drag is in progress at the time. | 77 // AppListFolderView's methods if a drag is in progress at the time. |
| 77 items_grid_view_->set_folder_delegate(nullptr); | 78 items_grid_view_->set_folder_delegate(nullptr); |
| 78 } | 79 } |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 void AppListFolderView::GiveBackFocusToSearchBox() { | 322 void AppListFolderView::GiveBackFocusToSearchBox() { |
| 322 app_list_main_view_->search_box_view()->search_box()->RequestFocus(); | 323 app_list_main_view_->search_box_view()->search_box()->RequestFocus(); |
| 323 } | 324 } |
| 324 | 325 |
| 325 void AppListFolderView::SetItemName(AppListFolderItem* item, | 326 void AppListFolderView::SetItemName(AppListFolderItem* item, |
| 326 const std::string& name) { | 327 const std::string& name) { |
| 327 model_->SetItemName(item, name); | 328 model_->SetItemName(item, name); |
| 328 } | 329 } |
| 329 | 330 |
| 330 } // namespace app_list | 331 } // namespace app_list |
| OLD | NEW |