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

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: Removed ET_SCROLL_FLING_CANCEL handling from TransparentButton and removed WindowSelector.MultiWind… Created 5 years, 12 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 584d2758929ac36442240948171031f7bb494e0e..6fa6b0dd1f1c780c95807105780d45d6aece16a3 100644
--- a/ash/wm/overview/window_selector_item.h
+++ b/ash/wm/overview/window_selector_item.h
@@ -18,12 +18,12 @@
namespace aura {
class Window;
-}
+} // namespace aura
namespace views {
class Label;
class Widget;
-}
+} // namespace views
namespace ash {
@@ -102,7 +102,10 @@ class ASH_EXPORT WindowSelectorItem
void OnWindowTitleChanged(aura::Window* window) override;
// ash::TransparentActivateWindowButtonDelegate:
+ void Scroll(int delta_x) override;
+ void CancelScroll() override;
void Select() override;
+ void Close() override;
private:
friend class WindowSelectorTest;
@@ -128,6 +131,10 @@ class ASH_EXPORT WindowSelectorItem
// Initializes window_label_.
void CreateWindowLabel(const base::string16& title);
+ // Set the minimum distance, in pixels, for which a scroll gesture will cause
+ // a window to be closed when the scroll distance exceeds |distance|.
+ void SetCloseWindowDistanceMinimum(int distance);
+
// Updates the bounds and accessibility names for all the transparent
// overlays.
void UpdateSelectorButtons();

Powered by Google App Engine
This is Rietveld 408576698