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

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

Issue 2639203007: Update SetPaintToLayer to accept LayerType (Closed)
Patch Set: Refactor 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_main_view.h" 5 #include "ui/app_list/views/app_list_main_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 12 matching lines...) Expand all
23 #include "ui/app_list/search_box_model.h" 23 #include "ui/app_list/search_box_model.h"
24 #include "ui/app_list/views/app_list_folder_view.h" 24 #include "ui/app_list/views/app_list_folder_view.h"
25 #include "ui/app_list/views/app_list_item_view.h" 25 #include "ui/app_list/views/app_list_item_view.h"
26 #include "ui/app_list/views/apps_container_view.h" 26 #include "ui/app_list/views/apps_container_view.h"
27 #include "ui/app_list/views/apps_grid_view.h" 27 #include "ui/app_list/views/apps_grid_view.h"
28 #include "ui/app_list/views/contents_view.h" 28 #include "ui/app_list/views/contents_view.h"
29 #include "ui/app_list/views/custom_launcher_page_view.h" 29 #include "ui/app_list/views/custom_launcher_page_view.h"
30 #include "ui/app_list/views/search_box_view.h" 30 #include "ui/app_list/views/search_box_view.h"
31 #include "ui/app_list/views/search_result_page_view.h" 31 #include "ui/app_list/views/search_result_page_view.h"
32 #include "ui/app_list/views/start_page_view.h" 32 #include "ui/app_list/views/start_page_view.h"
33 #include "ui/compositor/layer_type.h"
33 #include "ui/views/border.h" 34 #include "ui/views/border.h"
34 #include "ui/views/controls/button/button.h" 35 #include "ui/views/controls/button/button.h"
35 #include "ui/views/controls/button/custom_button.h" 36 #include "ui/views/controls/button/custom_button.h"
36 #include "ui/views/controls/textfield/textfield.h" 37 #include "ui/views/controls/textfield/textfield.h"
37 #include "ui/views/layout/box_layout.h" 38 #include "ui/views/layout/box_layout.h"
38 #include "ui/views/layout/fill_layout.h" 39 #include "ui/views/layout/fill_layout.h"
39 #include "ui/views/widget/widget.h" 40 #include "ui/views/widget/widget.h"
40 41
41 namespace app_list { 42 namespace app_list {
42 43
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 121
121 void AppListMainView::AddContentsViews() { 122 void AppListMainView::AddContentsViews() {
122 DCHECK(search_box_view_); 123 DCHECK(search_box_view_);
123 124
124 contents_view_ = new ContentsView(this); 125 contents_view_ = new ContentsView(this);
125 contents_view_->Init(model_); 126 contents_view_->Init(model_);
126 AddChildView(contents_view_); 127 AddChildView(contents_view_);
127 128
128 search_box_view_->set_contents_view(contents_view_); 129 search_box_view_->set_contents_view(contents_view_);
129 130
130 contents_view_->SetPaintToLayer(true); 131 contents_view_->SetPaintToLayer(ui::LAYER_TEXTURED);
131 contents_view_->layer()->SetFillsBoundsOpaquely(false); 132 contents_view_->layer()->SetFillsBoundsOpaquely(false);
132 contents_view_->layer()->SetMasksToBounds(true); 133 contents_view_->layer()->SetMasksToBounds(true);
133 134
134 delegate_->StartSearch(); 135 delegate_->StartSearch();
135 } 136 }
136 137
137 void AppListMainView::ShowAppListWhenReady() { 138 void AppListMainView::ShowAppListWhenReady() {
138 if (pending_icon_loaders_.empty()) { 139 if (pending_icon_loaders_.empty()) {
139 icon_loading_wait_timer_.Stop(); 140 icon_loading_wait_timer_.Stop();
140 GetWidget()->Show(); 141 GetWidget()->Show();
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 contents_view_->search_results_page_view()->SetSelection(select); 313 contents_view_->search_results_page_view()->SetSelection(select);
313 } 314 }
314 315
315 void AppListMainView::OnResultInstalled(SearchResult* result) { 316 void AppListMainView::OnResultInstalled(SearchResult* result) {
316 // Clears the search to show the apps grid. The last installed app 317 // Clears the search to show the apps grid. The last installed app
317 // should be highlighted and made visible already. 318 // should be highlighted and made visible already.
318 search_box_view_->ClearSearch(); 319 search_box_view_->ClearSearch();
319 } 320 }
320 321
321 } // namespace app_list 322 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698