Chromium Code Reviews| Index: ash/common/shelf/shelf_view.cc |
| diff --git a/ash/common/shelf/shelf_view.cc b/ash/common/shelf/shelf_view.cc |
| index d99b9e76fdbea9a0df593b57f7a6eec0da50f799..cc4b5d46c26ad363eb268c54173ccb309ce10391 100644 |
| --- a/ash/common/shelf/shelf_view.cc |
| +++ b/ash/common/shelf/shelf_view.cc |
| @@ -476,6 +476,16 @@ void ShelfView::ButtonPressed(views::Button* sender, |
| break; |
| } |
| + // If this is the overflow shelf, |main_shelf_| will not be null. When an item |
| + // is pressed on the overflow shelf, we want to hide the overflow bubble, |
| + // which is associated with the main shelf. Note: this will invalidate |
|
msw
2017/04/06 23:19:03
nit: remove this Note, or rephrase as "Hiding the
sammiequon
2017/04/06 23:34:46
Removed.
|
| + // |sender| as it is a child of the overflow shelf, but it is released |
| + // asynchronously. |
| + if (main_shelf_) { |
| + if (main_shelf_->IsShowingOverflowBubble()) |
| + main_shelf_->ToggleOverflowBubble(); |
| + } |
| + |
| const int64_t display_id = window->GetDisplayNearestWindow().id(); |
| // Notify the item of its selection; handle the result in AfterItemSelected. |