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

Unified Diff: ash/wm/overview/window_selector_item.h

Issue 690103008: Implemented swipe to close in overview mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Implemented swipe to close on top of other changes in overview mode Created 5 years, 10 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
Index: ash/wm/overview/window_selector_item.h
diff --git a/ash/wm/overview/window_selector_item.h b/ash/wm/overview/window_selector_item.h
index 1ce6fa102353ad4036b1720e13bee4b9b35abf56..623fd91397470c217a08cba1ae530160bd2f9a69 100644
--- a/ash/wm/overview/window_selector_item.h
+++ b/ash/wm/overview/window_selector_item.h
@@ -73,6 +73,20 @@ class ASH_EXPORT WindowSelectorItem : public views::ButtonListener,
const gfx::Rect& target_bounds() const { return target_bounds_; }
+ // Called when a touch scroll begin event occurs on this selector item.
+ void OnScrollBegin();
+
+ // Called when a touch scroll update event occurs on this selector item.
+ void OnScrollUpdate(int delta_x);
+
+ // Called when a touch scroll end event occurs on this selector item. This may
+ // cause the window to be closed.
+ void OnScrollEnd(int delta_x);
+
+ // Called when a touch fling event occurs on this selector item. This may
+ // cause the window to be closed.
+ void OnFling(int delta_x, float velocity_x);
+
// views::ButtonListener:
void ButtonPressed(views::Button* sender, const ui::Event& event) override;
@@ -106,6 +120,14 @@ class ASH_EXPORT WindowSelectorItem : public views::ButtonListener,
// Updates the close buttons accessibility name.
void UpdateCloseButtonAccessibilityName();
+ // Animates the |transform_window_| back to it's original overview mode
+ // position.
+ void ResetScrolledWindow();
+
+ // Returns the minimum distance at which a scroll gesture will cause this
+ // selector item to be closed.
+ int GetMinimumCloseDistance() const;
+
// True if the item is being shown in the overview, false if it's being
// filtered.
bool dimmed_;

Powered by Google App Engine
This is Rietveld 408576698