Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(693)

Unified Diff: ash/system/tray/system_tray_bubble.cc

Issue 2961313003: Touch gestures for System Tray/ IME/ Stylus/ Notifications (Closed)
Patch Set: Fixed comments. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/system/tray/system_tray.cc ('k') | ash/system/tray/system_tray_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « ash/system/tray/system_tray.cc ('k') | ash/system/tray/system_tray_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698