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

Unified Diff: chrome/browser/ui/views/infobars/infobar_container_view.cc

Issue 2705763002: InfoBarContainerView: Redraws infobars on a native theme change (Closed)
Patch Set: Address pkasting@'s comments Created 3 years, 10 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 | « chrome/browser/ui/views/infobars/infobar_container_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/infobars/infobar_container_view.cc
diff --git a/chrome/browser/ui/views/infobars/infobar_container_view.cc b/chrome/browser/ui/views/infobars/infobar_container_view.cc
index a1e59e753b8e2ee5dc25ad63c5af5767e0a92c5b..cb23d6540108595d41fb30c148aad1344c050dac 100644
--- a/chrome/browser/ui/views/infobars/infobar_container_view.cc
+++ b/chrome/browser/ui/views/infobars/infobar_container_view.cc
@@ -122,6 +122,14 @@ void InfoBarContainerView::GetAccessibleNodeData(ui::AXNodeData* node_data) {
node_data->SetName(l10n_util::GetStringUTF8(IDS_ACCNAME_INFOBAR_CONTAINER));
}
+void InfoBarContainerView::OnNativeThemeChanged(const ui::NativeTheme* theme) {
+ // Infobars must be redrawn when the NativeTheme changes because
+ // they have a border with color COLOR_TOOLBAR_BOTTOM_SEPARATOR,
+ // which might have changed.
+ for (int i = 0; i < child_count(); ++i)
+ child_at(i)->SchedulePaint();
+}
+
void InfoBarContainerView::PlatformSpecificAddInfoBar(
infobars::InfoBar* infobar,
size_t position) {
« no previous file with comments | « chrome/browser/ui/views/infobars/infobar_container_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698