Chromium Code Reviews| Index: ash/system/tray/system_tray.h |
| diff --git a/ash/system/tray/system_tray.h b/ash/system/tray/system_tray.h |
| index fa16c53f74067aaee8e1eacaccff91add8d1d17d..9790a7fbf7d2683980e4ec1e803eca0ee6156bfb 100644 |
| --- a/ash/system/tray/system_tray.h |
| +++ b/ash/system/tray/system_tray.h |
| @@ -38,6 +38,9 @@ class TrayTiles; |
| class TrayUpdate; |
| class WebNotificationTray; |
| +// The threshold of the velocity of the fling event. |
| +const float kFlingVelocity = 100.0f; |
|
tdanderson
2017/06/22 20:21:43
as-is, this constant is being exposed to the entir
minch1
2017/06/23 22:39:57
Done.
|
| + |
| // There are different methods for creating bubble views. |
| enum BubbleCreationType { |
| BUBBLE_CREATE_NEW, // Closes any existing bubble and creates a new one. |
| @@ -142,6 +145,11 @@ class ASH_EXPORT SystemTray : public TrayBackgroundView, |
| // Activates the system tray bubble. |
| void ActivateBubble(); |
| + // ui::EventHandler: |
| + void OnGestureEvent(ui::GestureEvent* event) override; |
| + |
| + gfx::Rect GetWorkAreaBoundsInScreen() const; |
| + |
| private: |
| friend class SystemTrayTestApi; |
| class ActivationObserver; |
| @@ -193,6 +201,32 @@ class ASH_EXPORT SystemTray : public TrayBackgroundView, |
| // Overridden from ActionableView. |
| 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 the location. |
|
tdanderson
2017/06/22 20:21:42
nit: also specify that |location| is in the local
minch1
2017/06/23 22:39:57
Done.
|
| + void SetBubbleBounds(gfx::Point* location); |
| + |
| + // 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 |
| + // |sequence_end|. Otherwise return false, indicating that the |
| + // partially-visible system bubble should be animated downward and made fully |
| + // hidden. |
| + bool ShouldShowSystemBubbleAfterScrollSequence( |
| + const ui::GestureEvent& gesture); |
| + |
| + // Shelf the system tray is in. |
| + Shelf* const shelf_; |
| + |
| + // The original bounds of the system tray bubble. |
| + gfx::Rect system_tray_bubble_bounds_; |
| + |
| + // Tracks the amount of the drag. |
| + float gesture_drag_amount_ = 0.f; |
| + |
| // The web notification tray view that appears adjacent to this view. |
| WebNotificationTray* web_notification_tray_ = nullptr; |