Index: ui/message_center/views/notification_button.cc |
diff --git a/ui/message_center/views/notification_button.cc b/ui/message_center/views/notification_button.cc |
index 3cc0fecf037a6015c1b181a45f37097d1548f451..77c359c23a00cb5398ef87345996e0f48b48e1e0 100644 |
--- a/ui/message_center/views/notification_button.cc |
+++ b/ui/message_center/views/notification_button.cc |
@@ -98,6 +98,14 @@ void NotificationButton::OnBlur() { |
SchedulePaint(); |
} |
+void NotificationButton::ViewHierarchyChanged( |
+ const ViewHierarchyChangedDetails& details) { |
+ // We disable view hierarchy change detection in the parent |
+ // because it resets the hoverstate, which we do not want |
+ // when we update the view to contain a new label or image. |
+ views::View::ViewHierarchyChanged(details); |
+} |
+ |
void NotificationButton::StateChanged() { |
if (state() == STATE_HOVERED || state() == STATE_PRESSED) { |
set_background(views::Background::CreateSolidBackground( |