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

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: Created 6 years, 1 month 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 6769a7d978f020a0db743c2f7e28ad43a9998fbe..947a7fbced3b22a85fa546a09cf0af5f957b0aa7 100644
--- a/ash/wm/overview/window_selector_item.h
+++ b/ash/wm/overview/window_selector_item.h
@@ -99,7 +99,10 @@ class WindowSelectorItem : public views::ButtonListener,
virtual void OnWindowTransformed(aura::Window* window) override;
// ash::TransparentActivateWindowButtonDelegate:
+ virtual void Scroll(int delta_x) override;
+ virtual void CancelScroll() override;
virtual void Select() override;
+ virtual void Close() override;
jonross 2014/11/12 23:57:03 nit: remove virtual from all of the overrides.
bruthig 2015/01/02 16:49:17 Done.
protected:
// Sets the bounds of this selector's items to |target_bounds| in
@@ -138,11 +141,11 @@ class WindowSelectorItem : public views::ButtonListener,
return transform_window_.get();
}
- // Closes the window managed by |this|.
- void Close();
-
// ash::TransparentActivateWindowButtonDelegate:
+ virtual void Scroll(int delta_x) override;
+ virtual void CancelScroll() override;
virtual void Select() override;
+ virtual void Close() override;
private:
// The transparent overlay that captures events.
@@ -163,6 +166,10 @@ class WindowSelectorItem : public views::ButtonListener,
// 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 selector button overlay's bounds and accessibility names.
void UpdateSelectorButtons();

Powered by Google App Engine
This is Rietveld 408576698