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

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

Issue 2961313003: Touch gestures for System Tray/ IME/ Stylus/ Notifications (Closed)
Patch Set: Create SystemTrayBubbleView instead of Delegate. 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.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..86ea0ea368b5cacd206aab2100c24d4dd866d00d 100644
--- a/ash/system/tray/system_tray.h
+++ b/ash/system/tray/system_tray.h
@@ -152,8 +152,15 @@ 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.
+ bool ProcessGestureEvent(const ui::GestureEvent& event);
+
gfx::Rect GetWorkAreaBoundsInScreen() const;
+ void set_target_view(View* target_view) { target_view_ = target_view; }
+
private:
friend class SystemTrayTestApi;
class ActivationObserver;
@@ -202,7 +209,6 @@ 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);
@@ -232,6 +238,10 @@ class ASH_EXPORT SystemTray : public TrayBackgroundView,
// tray bubble, false otherwise.
bool is_in_drag_ = false;
+ // The view that the dragging triggered on (i.e, dragging can starts from
+ // system tray or system tray bubble).
+ View* target_view_;
+
// 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.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698