Index: ash/system/tray/system_tray.h |
diff --git a/ash/system/tray/system_tray.h b/ash/system/tray/system_tray.h |
index fe8a0fdd31ce963155313cde514041c6370d8e13..c29431550fe6fd51ee0cd76dd80a53ea39b3d4f2 100644 |
--- a/ash/system/tray/system_tray.h |
+++ b/ash/system/tray/system_tray.h |
@@ -152,6 +152,12 @@ class ASH_EXPORT SystemTray : public TrayBackgroundView, |
// ui::EventHandler: |
void OnGestureEvent(ui::GestureEvent* event) override; |
+ // Process a gesture event and updates the dragging state of the bubble when |
+ // appropriate. Returns true if the gesture has been handled and it should not |
+ // be processed any further, false otherwise. Note, the events may triggered |
xdai1
2017/06/30 22:27:08
nit: may be triggered
minch1
2017/07/01 05:57:14
Done.
|
+ // on system tray or system tray bubble. |
+ bool ProcessGestureEvent(const ui::GestureEvent& event, bool is_on_bubble); |
+ |
gfx::Rect GetWorkAreaBoundsInScreen() const; |
private: |
@@ -202,14 +208,13 @@ class ASH_EXPORT SystemTray : public TrayBackgroundView, |
bool PerformAction(const ui::Event& event) override; |
// Gesture related functions: |
- bool ProcessGestureEvent(const ui::GestureEvent& event); |
bool StartGestureDrag(const ui::GestureEvent& gesture); |
void UpdateGestureDrag(const ui::GestureEvent& gesture); |
void CompleteGestureDrag(const ui::GestureEvent& gesture); |
- // Update the bounds of the system tray bubble according to |location|. Note |
- // that |location| is in the local coordinate space of |this|. |
- void SetBubbleBounds(const gfx::Point& location); |
+ // Update the bounds of the system tray bubble according to |
+ // |gesture_drag_amount_|. |
+ void SetBubbleBounds(); |
xdai1
2017/06/30 22:27:08
I think UpdateBubbleBounds() might better describe
minch1
2017/07/01 05:57:14
Done.
|
// Return true if the system bubble should be shown (i.e., animated upward to |
// be made fully visible) after a sequence of scroll events terminated by |
@@ -232,6 +237,10 @@ class ASH_EXPORT SystemTray : public TrayBackgroundView, |
// tray bubble, false otherwise. |
bool is_in_drag_ = false; |
+ // True if the dragging is on system tray bubble, false otherwise. Note, |
+ // should always set this before ProcessGestureEvent. |
+ bool is_on_bubble_ = false; |
xdai1
2017/06/30 22:27:08
considering rename it to is_dragging_bubble_?
minch1
2017/07/01 05:57:13
There is another flag |is_in_drag_| for dragging s
|
+ |
// The web notification tray view that appears adjacent to this view. |
WebNotificationTray* web_notification_tray_ = nullptr; |