Commit 3d200b92 authored by Melissa Zhang's avatar Melissa Zhang Committed by Chromium LUCI CQ

[Sharesheet] Missing close check.

Add close check so that sharesheet can't close if it's already
in the process of closing.

Bug: 1153284
Change-Id: I1279240e2ceb9c7769ab96244d8aa3d3393aec11
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2570914
Auto-Submit: Melissa Zhang <melzhang@chromium.org>
Commit-Queue: Dominick Ng <dominickn@chromium.org>
Reviewed-by: default avatarDominick Ng <dominickn@chromium.org>
Cr-Commit-Position: refs/heads/master@{#833517}
parent 8d00b029
...@@ -447,7 +447,7 @@ void SharesheetBubbleView::OnWidgetActivationChanged(views::Widget* widget, ...@@ -447,7 +447,7 @@ void SharesheetBubbleView::OnWidgetActivationChanged(views::Widget* widget,
// Catch widgets that are closing due to the user clicking out of the bubble. // Catch widgets that are closing due to the user clicking out of the bubble.
// If |user_selection_made_| we should not close the bubble here as it will be // If |user_selection_made_| we should not close the bubble here as it will be
// closed in a different code path. // closed in a different code path.
if (!active && !user_selection_made_) { if (!active && !user_selection_made_ && !is_bubble_closing_) {
if (close_callback_) { if (close_callback_) {
std::move(close_callback_).Run(sharesheet::SharesheetResult::kCancel); std::move(close_callback_).Run(sharesheet::SharesheetResult::kCancel);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment