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

Unified Diff: ui/views/controls/combobox/combobox.cc

Issue 2637383003: Change Painter factory functions to unique_ptr (Closed)
Patch Set: msw review 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/controls/button/md_text_button.cc ('k') | ui/views/controls/textfield/textfield.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/combobox/combobox.cc
diff --git a/ui/views/controls/combobox/combobox.cc b/ui/views/controls/combobox/combobox.cc
index d50f5543bb85055e1d0ba2d60af11c1fa9c137c4..42b79d9f88e5c9431379a01e993b6bcae7ddba9d 100644
--- a/ui/views/controls/combobox/combobox.cc
+++ b/ui/views/controls/combobox/combobox.cc
@@ -428,8 +428,8 @@ Combobox::Combobox(ui::ComboboxModel* model, Style style)
size_t num;
bool focused = !!i;
const int* ids = GetBodyButtonImageIds(focused, state, &num);
- body_button_painters_[focused][state].reset(
- Painter::CreateImageGridPainter(ids));
+ body_button_painters_[focused][state] =
+ Painter::CreateImageGridPainter(ids);
menu_button_images_[focused][state] = GetMenuButtonImages(focused, state);
}
}
@@ -553,11 +553,11 @@ void Combobox::OnNativeThemeChanged(const ui::NativeTheme* theme) {
if (!UseMd())
return;
- set_background(Background::CreateBackgroundPainter(
- true, Painter::CreateSolidRoundRectPainter(
- theme->GetSystemColor(
- ui::NativeTheme::kColorId_TextfieldDefaultBackground),
- FocusableBorder::kCornerRadiusDp)));
+ set_background(
+ Background::CreateBackgroundPainter(Painter::CreateSolidRoundRectPainter(
+ theme->GetSystemColor(
+ ui::NativeTheme::kColorId_TextfieldDefaultBackground),
+ FocusableBorder::kCornerRadiusDp)));
}
int Combobox::GetRowCount() {
« no previous file with comments | « ui/views/controls/button/md_text_button.cc ('k') | ui/views/controls/textfield/textfield.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698