| 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 "grit/ui_strings.h" | 9 #include "grit/ui_strings.h" |
| 10 #include "ui/accessibility/ax_view_state.h" | 10 #include "ui/accessibility/ax_view_state.h" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 new AppsGridView(app_list_main_view_, pagination_model_.get()); | 60 new AppsGridView(app_list_main_view_, pagination_model_.get()); |
| 61 items_grid_view_->set_folder_delegate(this); | 61 items_grid_view_->set_folder_delegate(this); |
| 62 items_grid_view_->SetLayout( | 62 items_grid_view_->SetLayout( |
| 63 kPreferredIconDimension, | 63 kPreferredIconDimension, |
| 64 container_view->apps_grid_view()->cols(), | 64 container_view->apps_grid_view()->cols(), |
| 65 container_view->apps_grid_view()->rows_per_page()); | 65 container_view->apps_grid_view()->rows_per_page()); |
| 66 items_grid_view_->SetModel(model); | 66 items_grid_view_->SetModel(model); |
| 67 AddChildView(items_grid_view_); | 67 AddChildView(items_grid_view_); |
| 68 view_model_->Add(items_grid_view_, kIndexChildItems); | 68 view_model_->Add(items_grid_view_, kIndexChildItems); |
| 69 | 69 |
| 70 #if defined(USE_AURA) | |
| 71 SetPaintToLayer(true); | 70 SetPaintToLayer(true); |
| 72 SetFillsBoundsOpaquely(false); | 71 SetFillsBoundsOpaquely(false); |
| 73 #endif | |
| 74 | 72 |
| 75 model_->AddObserver(this); | 73 model_->AddObserver(this); |
| 76 } | 74 } |
| 77 | 75 |
| 78 AppListFolderView::~AppListFolderView() { | 76 AppListFolderView::~AppListFolderView() { |
| 79 model_->RemoveObserver(this); | 77 model_->RemoveObserver(this); |
| 80 // Make sure |items_grid_view_| is deleted before |pagination_model_|. | 78 // Make sure |items_grid_view_| is deleted before |pagination_model_|. |
| 81 RemoveAllChildViews(true); | 79 RemoveAllChildViews(true); |
| 82 } | 80 } |
| 83 | 81 |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 void AppListFolderView::GiveBackFocusToSearchBox() { | 318 void AppListFolderView::GiveBackFocusToSearchBox() { |
| 321 app_list_main_view_->search_box_view()->search_box()->RequestFocus(); | 319 app_list_main_view_->search_box_view()->search_box()->RequestFocus(); |
| 322 } | 320 } |
| 323 | 321 |
| 324 void AppListFolderView::SetItemName(AppListFolderItem* item, | 322 void AppListFolderView::SetItemName(AppListFolderItem* item, |
| 325 const std::string& name) { | 323 const std::string& name) { |
| 326 model_->SetItemName(item, name); | 324 model_->SetItemName(item, name); |
| 327 } | 325 } |
| 328 | 326 |
| 329 } // namespace app_list | 327 } // namespace app_list |
| OLD | NEW |