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

Unified Diff: ui/arc/notification/arc_custom_notification_view.cc

Issue 2338423002: arc: Fix crash on close a notification (Closed)
Patch Set: handle surface A->B in addition to A->nullptr Created 4 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/arc/notification/arc_custom_notification_view.cc
diff --git a/ui/arc/notification/arc_custom_notification_view.cc b/ui/arc/notification/arc_custom_notification_view.cc
index d9da938f33ca604aa89fdbb3bb5b76a8c647a7a9..f0ba730697cd75b070bb17a7d42038359d2cd267 100644
--- a/ui/arc/notification/arc_custom_notification_view.cc
+++ b/ui/arc/notification/arc_custom_notification_view.cc
@@ -213,6 +213,9 @@ void ArcCustomNotificationView::SetSurface(exo::NotificationSurface* surface) {
if (surface_ == surface)
return;
+ // Reset |floating_close_button_widget_| when |surface_| is changed.
+ floating_close_button_widget_.reset();
+
if (surface_ && surface_->window()) {
surface_->window()->RemoveObserver(this);
surface_->window()->RemovePreTargetHandler(event_forwarder_.get());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698