#include "ui/views/animation/slide_out_controller.h"
#include <algorithm>
#include "base/functional/bind.h"
#include "base/task/single_thread_task_runner.h"
#include "base/time/time.h"
#include "ui/base/ui_base_features.h"
#include "ui/compositor/layer.h"
#include "ui/compositor/scoped_layer_animation_settings.h"
#include "ui/events/event.h"
#include "ui/events/types/event_type.h"
#include "ui/gfx/geometry/transform.h"
#include "ui/views/animation/animation_builder.h"
#include "ui/views/animation/slide_out_controller_delegate.h"
namespace views {
namespace {
constexpr base::TimeDelta kSwipeRestoreDuration = …;
constexpr int kSwipeOutTotalDurationMs = …;
gfx::Tween::Type kSwipeTweenType = …;
constexpr int kSwipeCloseMargin = …;
}
SlideOutController::SlideOutController(ui::EventTarget* target,
SlideOutControllerDelegate* delegate)
: … { … }
SlideOutController::~SlideOutController() = default;
void SlideOutController::CaptureControlOpenState() { … }
void SlideOutController::OnGestureEvent(ui::GestureEvent* event) { … }
void SlideOutController::OnScrollEvent(ui::ScrollEvent* event) { … }
void SlideOutController::RestoreVisualState() { … }
void SlideOutController::SlideOutAndClose(int direction) { … }
void SlideOutController::SetOpacityIfNecessary(float opacity) { … }
void SlideOutController::SetTransformWithAnimationIfNecessary(
const gfx::Transform& transform,
base::TimeDelta animation_duration) { … }
void SlideOutController::OnAnimationsCompleted() { … }
void SlideOutController::OnSlideOut() { … }
void SlideOutController::SetSwipeControlWidth(int swipe_control_width) { … }
void SlideOutController::CloseSwipeControl() { … }
}