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

Unified Diff: chrome/browser/ui/views/autofill/password_generation_popup_view_views.cc

Issue 2816193002: Introduce a type of View background that stays in sync with its host (Closed)
Patch Set: rebase Created 3 years, 8 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 | « ash/system/user/user_view.cc ('k') | chrome/browser/ui/views/sad_tab_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/autofill/password_generation_popup_view_views.cc
diff --git a/chrome/browser/ui/views/autofill/password_generation_popup_view_views.cc b/chrome/browser/ui/views/autofill/password_generation_popup_view_views.cc
index addc3e0e9a2734b44e38d2967e0aa64b8189c6ab..6970f7df1c7d7aa85010fc9afa81ab6adacfee2d 100644
--- a/chrome/browser/ui/views/autofill/password_generation_popup_view_views.cc
+++ b/chrome/browser/ui/views/autofill/password_generation_popup_view_views.cc
@@ -155,9 +155,8 @@ PasswordGenerationPopupViewViews::PasswordGenerationPopupViewViews(
PasswordGenerationPopupController::kHorizontalPadding));
AddChildView(help_label_);
- set_background(views::Background::CreateSolidBackground(
- GetNativeTheme()->GetSystemColor(
- ui::NativeTheme::kColorId_ResultsTableNormalBackground)));
+ set_background(views::Background::CreateThemedSolidBackground(
+ this, ui::NativeTheme::kColorId_ResultsTableNormalBackground));
}
PasswordGenerationPopupViewViews::~PasswordGenerationPopupViewViews() {}
@@ -212,12 +211,11 @@ void PasswordGenerationPopupViewViews::PasswordSelectionUpdated() {
if (controller_->password_selected())
NotifyAccessibilityEvent(ui::AX_EVENT_SELECTION, true);
- password_view_->set_background(
- views::Background::CreateSolidBackground(
- GetNativeTheme()->GetSystemColor(
- controller_->password_selected() ?
- ui::NativeTheme::kColorId_ResultsTableHoveredBackground :
- ui::NativeTheme::kColorId_ResultsTableNormalBackground)));
+ password_view_->set_background(views::Background::CreateThemedSolidBackground(
+ password_view_,
+ controller_->password_selected()
+ ? ui::NativeTheme::kColorId_ResultsTableHoveredBackground
+ : ui::NativeTheme::kColorId_ResultsTableNormalBackground));
}
void PasswordGenerationPopupViewViews::Layout() {
« no previous file with comments | « ash/system/user/user_view.cc ('k') | chrome/browser/ui/views/sad_tab_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698