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

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

Issue 2475543002: arc: Fix missing notification on extended desktop (Closed)
Patch Set: more explicit for bail-out condition Created 4 years, 1 month 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 3e927c583f21c0de73a9a74685faa97de0f7e96b..b1588fce5c6ee8e970e22a2e9238ae6c64e4694c 100644
--- a/ui/arc/notification/arc_custom_notification_view.cc
+++ b/ui/arc/notification/arc_custom_notification_view.cc
@@ -310,12 +310,14 @@ void ArcCustomNotificationView::ViewHierarchyChanged(
if (!details.is_add) {
// Resets slide helper when this view is removed from its parent.
slide_helper_.reset();
- }
- // Bail if native_view() has attached to a different widget.
- if (widget && native_view() &&
- views::Widget::GetTopLevelWidgetForNativeView(native_view()) != widget) {
- return;
+ // Bail if this view is no longer attached to a widget or native_view() has
+ // attached to a different widget.
+ if (!widget || (native_view() &&
+ views::Widget::GetTopLevelWidgetForNativeView(
+ native_view()) != widget)) {
+ return;
+ }
}
views::NativeViewHost::ViewHierarchyChanged(details);
« 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