#ifndef ASH_QUICK_INSERT_VIEWS_QUICK_INSERT_SKELETON_LOADER_VIEW_H_
#define ASH_QUICK_INSERT_VIEWS_QUICK_INSERT_SKELETON_LOADER_VIEW_H_
#include "ash/ash_export.h"
#include "base/time/time.h"
#include "base/timer/timer.h"
#include "ui/base/metadata/metadata_header_macros.h"
#include "ui/views/controls/image_view.h"
namespace views {
class AnimationAbortHandle;
}
namespace ash {
class ASH_EXPORT QuickInsertSkeletonLoaderView : public views::ImageView {
METADATA_HEADER(QuickInsertSkeletonLoaderView, views::ImageView)
public:
QuickInsertSkeletonLoaderView();
QuickInsertSkeletonLoaderView(const QuickInsertSkeletonLoaderView&) = delete;
QuickInsertSkeletonLoaderView& operator=(
const QuickInsertSkeletonLoaderView&) = delete;
~QuickInsertSkeletonLoaderView() override;
void StartAnimationAfter(base::TimeDelta initial_delay = base::Seconds(0));
void StopAnimation();
bool HasStartedAnimationForTesting() const;
private:
void StartAnimation();
base::OneShotTimer animation_start_timer_;
std::unique_ptr<views::AnimationAbortHandle> abort_handle_;
};
BEGIN_VIEW_BUILDER(ASH_EXPORT, QuickInsertSkeletonLoaderView, views::ImageView)
END_VIEW_BUILDER
}
DEFINE_VIEW_BUILDER(ASH_EXPORT, ash::QuickInsertSkeletonLoaderView)
#endif