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 063b141e92a594c728efcd9633144251fd19bc28..a4ed2c89102fbf9bd99b2ce422b70ecadcf74b1c 100644 |
--- a/ash/wm/overview/window_selector_item.h |
+++ b/ash/wm/overview/window_selector_item.h |
@@ -33,18 +33,29 @@ class ASH_EXPORT WindowSelectorItem : public views::ButtonListener, |
public: |
class OverviewLabelButton : public views::LabelButton { |
public: |
- OverviewLabelButton(views::ButtonListener* listener, |
+ OverviewLabelButton(WindowSelectorItem* selector_item, |
const base::string16& text); |
~OverviewLabelButton() override; |
void set_top_padding(int top_padding) { top_padding_ = top_padding; } |
+ // views::LabelButton: |
+ void OnGestureEvent(ui::GestureEvent* event) override; |
flackr
2015/02/12 18:52:43
nit: indentation.
bruthig
2015/02/12 20:34:16
Done.
|
+ |
protected: |
// views::LabelButton: |
gfx::Rect GetChildAreaBounds() override; |
private: |
+ // The WindowSelectorItem that the touch gestures are delegated to. |
+ // Not owned. |
+ WindowSelectorItem* selector_item_; |
+ |
+ // The original X location for a scroll begin event. |original_x_| is in the |
+ // local coordinate space of |this|. |
+ float scroll_x_origin_; |
+ |
// Padding on top of the button. |
int top_padding_; |
@@ -94,6 +105,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); |
flackr
2015/02/12 18:52:43
nit: I kind of feel like we should just have an On
bruthig
2015/02/12 20:34:16
Done.
|
+ |
// views::ButtonListener: |
void ButtonPressed(views::Button* sender, const ui::Event& event) override; |
@@ -127,6 +152,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_; |