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

Unified Diff: ui/message_center/views/custom_notification_view.cc

Issue 2685283002: Add UpdateNotificationSize to MessageCenterController. (Closed)
Patch Set: address 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
Index: ui/message_center/views/custom_notification_view.cc
diff --git a/ui/message_center/views/custom_notification_view.cc b/ui/message_center/views/custom_notification_view.cc
index e81ba9235958bb5370cb55617cae12eb4ea3b342..14106fb916253ea0ad13c213ad39219b224ba0b0 100644
--- a/ui/message_center/views/custom_notification_view.cc
+++ b/ui/message_center/views/custom_notification_view.cc
@@ -11,6 +11,7 @@
#include "ui/base/ime/text_input_type.h"
#include "ui/gfx/geometry/size.h"
#include "ui/message_center/message_center_style.h"
+#include "ui/message_center/views/message_center_controller.h"
#include "ui/views/background.h"
#include "ui/views/controls/button/image_button.h"
#include "ui/views/controls/image_view.h"
@@ -145,4 +146,10 @@ bool CustomNotificationView::OnKeyPressed(const ui::KeyEvent& event) {
return MessageView::OnKeyPressed(event);
}
+void CustomNotificationView::ChildPreferredSizeChanged(View* child) {
+ // Notify MessageCenterController when the custom content changes size,
+ // as it may need to relayout.
+ controller()->UpdateNotificationSize(notification_id());
+}
+
} // namespace message_center
« no previous file with comments | « ui/message_center/views/custom_notification_view.h ('k') | ui/message_center/views/custom_notification_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698