Chromium Code Reviews| Index: ash/system/tray/system_tray_bubble.cc |
| diff --git a/ash/system/tray/system_tray_bubble.cc b/ash/system/tray/system_tray_bubble.cc |
| index a9036cd1f38f54ae8da0b00ec2e810c5197663a7..05884fe866c4f5ce3edb91290879f8ecbbaefa14 100644 |
| --- a/ash/system/tray/system_tray_bubble.cc |
| +++ b/ash/system/tray/system_tray_bubble.cc |
| @@ -89,6 +89,26 @@ class CloseBubbleObserver : public ui::ImplicitAnimationObserver { |
| DISALLOW_COPY_AND_ASSIGN(CloseBubbleObserver); |
| }; |
| +class SystemTrayBubbleView : public TrayBubbleView { |
| + public: |
| + SystemTrayBubbleView(TrayBubbleView::InitParams* init_params, |
| + SystemTray* tray) |
| + : TrayBubbleView(*init_params), tray_(tray) {} |
| + |
| + // views::View |
|
xdai1
2017/06/30 22:27:08
nit: // views::View:
minch1
2017/07/01 05:57:14
Done.
|
| + void OnGestureEvent(ui::GestureEvent* event) override { |
| + if (tray_ && tray_->ProcessGestureEvent(*event, true)) |
|
xdai1
2017/06/30 22:27:08
nit: tray_->ProcessGestureEvent(*event, true /* is
minch1
2017/07/01 05:57:14
Done.
|
| + event->SetHandled(); |
| + else |
| + TrayBubbleView::OnGestureEvent(event); |
| + } |
| + |
| + private: |
| + SystemTray* tray_; // Not owned. |
| + |
| + DISALLOW_COPY_AND_ASSIGN(SystemTrayBubbleView); |
| +}; // namespace ash |
| + |
| // SystemTrayBubble |
| SystemTrayBubble::SystemTrayBubble( |
| @@ -243,7 +263,7 @@ void SystemTrayBubble::InitView(views::View* anchor, |
| } |
| init_params->anchor_view = anchor; |
| - bubble_view_ = new TrayBubbleView(*init_params); |
| + bubble_view_ = new SystemTrayBubbleView(init_params, tray_); |
| UpdateBottomPadding(); |
| bubble_view_->set_adjust_if_offscreen(false); |
| CreateItemViews(login_status); |