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

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

Issue 2259753003: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « ui/app_list/views/search_box_view.cc ('k') | ui/arc/notification/arc_notification_item.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/search_result_page_view.h" 5 #include "ui/app_list/views/search_result_page_view.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 19 matching lines...) Expand all
30 const int kTopPadding = 8; 30 const int kTopPadding = 8;
31 31
32 // The z-height of the search box and cards in this view. 32 // The z-height of the search box and cards in this view.
33 const int kSearchResultZHeight = 1; 33 const int kSearchResultZHeight = 1;
34 34
35 // A container view that ensures the card background and the shadow are painted 35 // A container view that ensures the card background and the shadow are painted
36 // in the correct order. 36 // in the correct order.
37 class SearchCardView : public views::View { 37 class SearchCardView : public views::View {
38 public: 38 public:
39 explicit SearchCardView(views::View* content_view) { 39 explicit SearchCardView(views::View* content_view) {
40 SetBorder(base::WrapUnique( 40 SetBorder(base::MakeUnique<views::ShadowBorder>(
41 new views::ShadowBorder(GetShadowForZHeight(kSearchResultZHeight)))); 41 GetShadowForZHeight(kSearchResultZHeight)));
42 SetLayoutManager(new views::FillLayout()); 42 SetLayoutManager(new views::FillLayout());
43 content_view->set_background( 43 content_view->set_background(
44 views::Background::CreateSolidBackground(kCardBackgroundColor)); 44 views::Background::CreateSolidBackground(kCardBackgroundColor));
45 AddChildView(content_view); 45 AddChildView(content_view);
46 } 46 }
47 47
48 ~SearchCardView() override {} 48 ~SearchCardView() override {}
49 }; 49 };
50 50
51 } // namespace 51 } // namespace
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 return switches::IsExperimentalAppListEnabled() 247 return switches::IsExperimentalAppListEnabled()
248 ? kSearchResultZHeight 248 ? kSearchResultZHeight
249 : AppListPage::GetSearchBoxZHeight(); 249 : AppListPage::GetSearchBoxZHeight();
250 } 250 }
251 251
252 void SearchResultPageView::OnHidden() { 252 void SearchResultPageView::OnHidden() {
253 ClearSelectedIndex(); 253 ClearSelectedIndex();
254 } 254 }
255 255
256 } // namespace app_list 256 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/views/search_box_view.cc ('k') | ui/arc/notification/arc_notification_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698