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

Unified Diff: chrome/browser/ui/views/profiles/profile_chooser_view.cc

Issue 1461923002: Change name of NativeTheme::instance() to make it clear it's web only. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: NATIVE_THEME_EXPORT for mac Created 5 years, 1 month 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
Index: chrome/browser/ui/views/profiles/profile_chooser_view.cc
diff --git a/chrome/browser/ui/views/profiles/profile_chooser_view.cc b/chrome/browser/ui/views/profiles/profile_chooser_view.cc
index 16412db0802e358bdb2c1ede32304da272241f02..cdffbf46c01f227808f6b83dd873cfc0b3542593 100644
--- a/chrome/browser/ui/views/profiles/profile_chooser_view.cc
+++ b/chrome/browser/ui/views/profiles/profile_chooser_view.cc
@@ -656,9 +656,6 @@ ProfileChooserView::ProfileChooserView(views::View* anchor_view,
// Reset the default margins inherited from the BubbleDelegateView.
// Add a small bottom inset so that the bubble's rounded corners show up.
set_margins(gfx::Insets(0, 0, 1, 0));
- set_background(views::Background::CreateSolidBackground(
- GetNativeTheme()->GetSystemColor(
- ui::NativeTheme::kColorId_DialogBackground)));
ResetView();
avatar_menu_.reset(new AvatarMenu(
@@ -725,6 +722,19 @@ void ProfileChooserView::Init() {
ShowView(view_mode_, avatar_menu_.get());
}
+void ProfileChooserView::OnNativeThemeChanged(
+ const ui::NativeTheme* native_theme) {
+ views::BubbleDelegateView::OnNativeThemeChanged(native_theme);
+ set_background(views::Background::CreateSolidBackground(
+ GetNativeTheme()->GetSystemColor(
+ ui::NativeTheme::kColorId_DialogBackground)));
+ if (auth_error_email_button_) {
+ auth_error_email_button_->SetTextColor(
+ views::LabelButton::STATE_NORMAL,
+ native_theme->GetSystemColor(ui::NativeTheme::kColorId_LinkEnabled));
+ }
+}
+
void ProfileChooserView::OnAvatarMenuChanged(
AvatarMenu* avatar_menu) {
if (IsProfileChooser(view_mode_) ||
@@ -1357,10 +1367,6 @@ views::View* ProfileChooserView::CreateCurrentProfileView(
gfx::CreateVectorIcon(gfx::VectorIconId::WARNING, 18,
gfx::kChromeIconGrey));
- auth_error_email_button_->SetTextColor(
- views::LabelButton::STATE_NORMAL,
- ui::NativeTheme::instance()->GetSystemColor(
- ui::NativeTheme::kColorId_LinkEnabled));
auth_error_email_button_->SetFocusable(true);
gfx::Insets insets =
views::LabelButtonAssetBorder::GetDefaultInsetsForStyle(

Powered by Google App Engine
This is Rietveld 408576698