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

Unified Diff: ash/system/tray/system_tray.h

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 | « no previous file | ash/system/tray/system_tray.cc » ('j') | ash/system/tray/system_tray_bubble.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..04b4301cd792bd96a00fcdfc224a4b8d37f70e3d 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 be
+ // triggered 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 UpdateBubbleBounds();
// 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;
+
// The web notification tray view that appears adjacent to this view.
WebNotificationTray* web_notification_tray_ = nullptr;
« no previous file with comments | « no previous file | ash/system/tray/system_tray.cc » ('j') | ash/system/tray/system_tray_bubble.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698