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

Unified Diff: ui/views/controls/slide_out_view.h

Issue 1645843003: Implement Non-Closable Notification (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unnecessary property. Created 4 years, 10 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
« no previous file with comments | « ui/message_center/views/notification_view_unittest.cc ('k') | ui/views/controls/slide_out_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..89962f2d317f40cb1f9be1a5f43e07179ae70725 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,6 +28,10 @@ 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,
@@ -41,7 +47,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);
};
« no previous file with comments | « ui/message_center/views/notification_view_unittest.cc ('k') | ui/views/controls/slide_out_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698