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..83208d9917bd2bcdee123c7506309ebeae1c4649 100644 |
| --- a/ash/common/shelf/shelf_view.cc |
| +++ b/ash/common/shelf/shelf_view.cc |
| @@ -438,6 +438,15 @@ void ShelfView::ButtonPressed(views::Button* sender, |
| if (!ShouldEventActivateButton(sender, event)) |
| return; |
| + // 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. Button presses on the main shelf |
| + // cause the overflow bubble to close itself via PointerWatcher functionality. |
| + if (main_shelf_) { |
| + if (main_shelf_->IsShowingOverflowBubble()) |
|
msw
2017/04/06 23:37:19
optional nit: combine the nested if statements:
if
sammiequon
2017/04/06 23:55:22
Done.
|
| + main_shelf_->ToggleOverflowBubble(); |
| + } |
| + |
| // Record the index for the last pressed shelf item. |
| last_pressed_index_ = view_model_->GetIndexOfView(sender); |
| DCHECK_LT(-1, last_pressed_index_); |