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..844239690f3c803b996037fe547becec129e6b3a 100644 |
| --- a/ash/common/shelf/shelf_view.cc |
| +++ b/ash/common/shelf/shelf_view.cc |
| @@ -438,6 +438,14 @@ 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 app |
|
msw
2017/04/06 21:57:50
nit: s/app/item/
sammiequon
2017/04/06 23:03:11
Done.
|
| + // is pressed on the overflow shelf, we want to hide the overflow bubble, |
| + // which is associated with the main shelf. |
| + if (main_shelf_) { |
|
msw
2017/04/06 21:57:50
For my own curiosity, how does the overflow bubble
sammiequon
2017/04/06 23:03:11
The overview bubble listens for pointer events and
msw
2017/04/06 23:19:03
Okay, what you have is fine, just add something li
sammiequon
2017/04/06 23:34:46
Done.
|
| + if (main_shelf_->IsShowingOverflowBubble()) |
| + main_shelf_->ToggleOverflowBubble(); |
|
msw
2017/04/06 21:57:50
I wonder, can closing the overflow bubble in this
sammiequon
2017/04/06 23:03:11
Hmm, I did not notice sender being used below and
msw
2017/04/06 23:19:03
This is probably fine as-is, given the aync Widget
sammiequon
2017/04/06 23:34:46
Acknowledged. Moved back to the regular location.
|
| + } |
| + |
| // Record the index for the last pressed shelf item. |
| last_pressed_index_ = view_model_->GetIndexOfView(sender); |
| DCHECK_LT(-1, last_pressed_index_); |