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

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

Issue 2834763003: [Notifications] Fix crashes. (Closed)
Patch Set: Address comments. Created 3 years, 8 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 | ui/arc/notification/arc_custom_notification_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/arc/notification/arc_custom_notification_view.h
diff --git a/ui/arc/notification/arc_custom_notification_view.h b/ui/arc/notification/arc_custom_notification_view.h
index 0e58d7e48aa683de03a34692e2b42f728408369b..6af56841a2aab374bbb0e1994f76ae85c923d711 100644
--- a/ui/arc/notification/arc_custom_notification_view.h
+++ b/ui/arc/notification/arc_custom_notification_view.h
@@ -70,7 +70,7 @@ class ArcCustomNotificationView
void CreateCloseButton();
void CreateSettingsButton();
- void CreateFloatingControlButtons();
+ void MaybeCreateFloatingControlButtons();
void SetSurface(exo::NotificationSurface* surface);
void UpdatePreferredSize();
void UpdateControlButtonsVisibility();
@@ -116,6 +116,8 @@ class ArcCustomNotificationView
void AnimationEnded(const gfx::Animation* animation) override;
void AnimationProgressed(const gfx::Animation* animation) override;
+ // If |item_| is null, we may be about to be destroyed. In this case,
+ // we have to be careful about what we do.
ArcCustomNotificationItem* item_ = nullptr;
exo::NotificationSurface* surface_ = nullptr;
« no previous file with comments | « no previous file | ui/arc/notification/arc_custom_notification_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698