Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: ui/app_list/views/app_list_folder_view.cc

Issue 2639203007: Update SetPaintToLayer to accept LayerType (Closed)
Patch Set: fix comments Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_node_data.h" 9 #include "ui/accessibility/ax_node_data.h"
10 #include "ui/app_list/app_list_constants.h" 10 #include "ui/app_list/app_list_constants.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(),
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();
67 layer()->SetFillsBoundsOpaquely(false); 67 layer()->SetFillsBoundsOpaquely(false);
68 68
69 model_->AddObserver(this); 69 model_->AddObserver(this);
70 } 70 }
71 71
72 AppListFolderView::~AppListFolderView() { 72 AppListFolderView::~AppListFolderView() {
73 model_->RemoveObserver(this); 73 model_->RemoveObserver(this);
74 74
75 // This prevents the AppsGridView's destructor from calling the now-deleted 75 // This prevents the AppsGridView's destructor from calling the now-deleted
76 // AppListFolderView's methods if a drag is in progress at the time. 76 // AppListFolderView's methods if a drag is in progress at the time.
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 void AppListFolderView::GiveBackFocusToSearchBox() { 343 void AppListFolderView::GiveBackFocusToSearchBox() {
344 app_list_main_view_->search_box_view()->search_box()->RequestFocus(); 344 app_list_main_view_->search_box_view()->search_box()->RequestFocus();
345 } 345 }
346 346
347 void AppListFolderView::SetItemName(AppListFolderItem* item, 347 void AppListFolderView::SetItemName(AppListFolderItem* item,
348 const std::string& name) { 348 const std::string& name) {
349 model_->SetItemName(item, name); 349 model_->SetItemName(item, name);
350 } 350 }
351 351
352 } // namespace app_list 352 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698