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..f72b10019f62d471d4c96d622440a7f4dd0e746b 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 { |
tdanderson
2017/07/04 21:50:45
I agree with earlier comments regarding the event-
|
+ public: |
+ SystemTrayBubbleView(TrayBubbleView::InitParams* init_params, |
+ SystemTray* tray) |
+ : TrayBubbleView(*init_params), tray_(tray) {} |
+ |
+ // views::View: |
+ void OnGestureEvent(ui::GestureEvent* event) override { |
+ if (tray_ && tray_->ProcessGestureEvent(*event, true /* is_on_bubble */)) |
+ 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); |