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..00bbf667078240eea9c9575a696e2e663f490720 100644 |
--- a/ui/views/controls/slide_out_view.h |
+++ b/ui/views/controls/slide_out_view.h |
@@ -19,6 +19,8 @@ class VIEWS_EXPORT SlideOutView : public views::View, |
SlideOutView(); |
~SlideOutView() override; |
+ bool slide_out_enabled() { return is_slide_out_enabled_; } |
+ |
protected: |
// Called when user intends to close the View by sliding it out. |
virtual void OnSlideOut() = 0; |
@@ -26,12 +28,18 @@ class VIEWS_EXPORT SlideOutView : public views::View, |
// Overridden from views::View. |
void OnGestureEvent(ui::GestureEvent* event) override; |
+ void set_slide_out_enabled(bool is_slide_out_enabled) { |
+ is_slide_out_enabled_ = is_slide_out_enabled; |
+ } |
+ |
private: |
enum SlideDirection { |
SLIDE_LEFT, |
SLIDE_RIGHT, |
}; |
+ static bool disable_animations_; |
sky
2016/02/25 02:35:41
Remove this as you no longer use/need it.
yoshiki
2016/02/25 04:46:27
Done.
|
+ |
// 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 is_slide_out_enabled_ = true; |
DISALLOW_COPY_AND_ASSIGN(SlideOutView); |
}; |