Chromium Code Reviews| Index: ui/views/controls/slide_out_view.h |
| diff --git a/ui/views/controls/slide_out_view.h b/ui/views/controls/slide_out_view.h |
| index 7fdb637cc7b75a9626f8fcd05595901ae1b82a9e..256537e87c1155e32ba9671b7a7865055d0da691 100644 |
| --- a/ui/views/controls/slide_out_view.h |
| +++ b/ui/views/controls/slide_out_view.h |
| @@ -16,9 +16,13 @@ namespace views { |
| class VIEWS_EXPORT SlideOutView : public views::View, |
| public ui::ImplicitAnimationObserver { |
| public: |
| + static void DisableAnimationsForTesting(); |
| + |
| SlideOutView(); |
| ~SlideOutView() override; |
| + bool closable() { return closable_; } |
|
dewittj
2016/02/03 19:31:37
It seems like this is not the appropriate place fo
yoshiki
2016/02/07 17:49:41
Done.
|
| + |
| protected: |
| // Called when user intends to close the View by sliding it out. |
| virtual void OnSlideOut() = 0; |
| @@ -26,12 +30,16 @@ class VIEWS_EXPORT SlideOutView : public views::View, |
| // Overridden from views::View. |
| void OnGestureEvent(ui::GestureEvent* event) override; |
| + void set_closable(bool closable) { closable_ = closable; } |
| + |
| private: |
| enum SlideDirection { |
| SLIDE_LEFT, |
| SLIDE_RIGHT, |
| }; |
| + static bool disable_animations_; |
| + |
| // Restores the transform and opacity of the view. |
| void RestoreVisualState(); |
| @@ -41,7 +49,8 @@ class VIEWS_EXPORT SlideOutView : public views::View, |
| // Overridden from ImplicitAnimationObserver. |
| void OnImplicitAnimationsCompleted() override; |
| - float gesture_scroll_amount_; |
| + float gesture_amount_ = 0.f; |
| + bool closable_ = true; |
| DISALLOW_COPY_AND_ASSIGN(SlideOutView); |
| }; |