#ifndef ASH_WM_SESSION_STATE_ANIMATOR_IMPL_H_
#define ASH_WM_SESSION_STATE_ANIMATOR_IMPL_H_
#include "ash/ash_export.h"
#include "ash/wm/session_state_animator.h"
#include "base/memory/raw_ptr.h"
#include "ui/aura/window.h"
namespace ui {
class LayerAnimationObserver;
}
namespace ash {
class ASH_EXPORT SessionStateAnimatorImpl : public SessionStateAnimator {
public:
class ASH_EXPORT TestApi {
public:
explicit TestApi(SessionStateAnimatorImpl* animator)
: animator_(animator) {}
TestApi(const TestApi&) = delete;
TestApi& operator=(const TestApi&) = delete;
bool ContainersAreAnimated(int container_mask,
SessionStateAnimator::AnimationType type) const;
bool RootWindowIsAnimated(SessionStateAnimator::AnimationType type) const;
private:
raw_ptr<SessionStateAnimatorImpl, ExperimentalAsh> animator_;
};
SessionStateAnimatorImpl();
SessionStateAnimatorImpl(const SessionStateAnimatorImpl&) = delete;
SessionStateAnimatorImpl& operator=(const SessionStateAnimatorImpl&) = delete;
~SessionStateAnimatorImpl() override;
static void GetContainers(int container_mask,
aura::Window::Windows* containers);
void StartAnimation(int container_mask,
AnimationType type,
AnimationSpeed speed) override;
void StartAnimationWithCallback(int container_mask,
AnimationType type,
AnimationSpeed speed,
base::OnceClosure callback) override;
AnimationSequence* BeginAnimationSequence(
AnimationCallback callback) override;
bool IsWallpaperHidden() const override;
void ShowWallpaper() override;
void HideWallpaper() override;
private:
class AnimationSequence;
friend class AnimationSequence;
virtual void StartAnimationInSequence(int container_mask,
AnimationType type,
AnimationSpeed speed,
AnimationSequence* observer);
void RunAnimationForWindow(aura::Window* window,
SessionStateAnimator::AnimationType type,
SessionStateAnimator::AnimationSpeed speed,
ui::LayerAnimationObserver* observer);
};
}
#endif