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

Side by Side Diff: chrome/browser/ui/views/find_bar_view.cc

Issue 2251263003: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 3 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/ui/views/find_bar_view.h" 5 #include "chrome/browser/ui/views/find_bar_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/i18n/number_formatting.h" 9 #include "base/i18n/number_formatting.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 IDR_FIND_DIALOG_RIGHT); 540 IDR_FIND_DIALOG_RIGHT);
541 541
542 preferred_height_ = rb.GetImageSkiaNamed(IDR_FIND_DIALOG_MIDDLE)->height(); 542 preferred_height_ = rb.GetImageSkiaNamed(IDR_FIND_DIALOG_MIDDLE)->height();
543 543
544 static const int kImages[] = IMAGE_GRID(IDR_TEXTFIELD); 544 static const int kImages[] = IMAGE_GRID(IDR_TEXTFIELD);
545 find_text_border_.reset(views::Painter::CreateImageGridPainter(kImages)); 545 find_text_border_.reset(views::Painter::CreateImageGridPainter(kImages));
546 } 546 }
547 547
548 void FindBarView::InitViewsForMaterial() { 548 void FindBarView::InitViewsForMaterial() {
549 // The background color is not used since there's no arrow. 549 // The background color is not used since there's no arrow.
550 SetBorder(base::WrapUnique(new views::BubbleBorder( 550 SetBorder(base::MakeUnique<views::BubbleBorder>(
551 views::BubbleBorder::NONE, views::BubbleBorder::SMALL_SHADOW, 551 views::BubbleBorder::NONE, views::BubbleBorder::SMALL_SHADOW,
552 SK_ColorGREEN))); 552 SK_ColorGREEN));
553 553
554 match_count_text_ = new MatchCountLabel(); 554 match_count_text_ = new MatchCountLabel();
555 match_count_text_->SetEventTargeter( 555 match_count_text_->SetEventTargeter(
556 base::WrapUnique(new views::ViewTargeter(this))); 556 base::MakeUnique<views::ViewTargeter>(this));
557 AddChildViewAt(match_count_text_, 1); 557 AddChildViewAt(match_count_text_, 1);
558 558
559 separator_ = new views::Separator(views::Separator::VERTICAL); 559 separator_ = new views::Separator(views::Separator::VERTICAL);
560 separator_->SetBorder(views::Border::CreateEmptyBorder( 560 separator_->SetBorder(views::Border::CreateEmptyBorder(
561 0, kSeparatorLeftSpacing, 0, kSeparatorRightSpacing)); 561 0, kSeparatorLeftSpacing, 0, kSeparatorRightSpacing));
562 AddChildViewAt(separator_, 2); 562 AddChildViewAt(separator_, 2);
563 563
564 find_text_->SetBorder(views::Border::NullBorder()); 564 find_text_->SetBorder(views::Border::NullBorder());
565 565
566 views::BoxLayout* manager = 566 views::BoxLayout* manager =
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 SkColor text_color = 663 SkColor text_color =
664 theme->GetSystemColor(ui::NativeTheme::kColorId_TextfieldDefaultColor); 664 theme->GetSystemColor(ui::NativeTheme::kColorId_TextfieldDefaultColor);
665 match_count_text_->SetEnabledColor(SkColorSetA(text_color, 0x69)); 665 match_count_text_->SetEnabledColor(SkColorSetA(text_color, 0x69));
666 separator_->SetColor(SkColorSetA(text_color, 0x26)); 666 separator_->SetColor(SkColorSetA(text_color, 0x26));
667 } 667 }
668 668
669 SkColor FindBarView::GetTextColorForIcon() { 669 SkColor FindBarView::GetTextColorForIcon() {
670 return GetNativeTheme()->GetSystemColor( 670 return GetNativeTheme()->GetSystemColor(
671 ui::NativeTheme::kColorId_TextfieldDefaultColor); 671 ui::NativeTheme::kColorId_TextfieldDefaultColor);
672 } 672 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/dropdown_bar_view.cc ('k') | chrome/browser/ui/views/frame/test_with_browser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698