#ifndef ASH_QUICK_INSERT_QUICK_INSERT_ASSET_FETCHER_IMPL_H_
#define ASH_QUICK_INSERT_QUICK_INSERT_ASSET_FETCHER_IMPL_H_
#include "ash/ash_export.h"
#include "ash/quick_insert/quick_insert_asset_fetcher.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/weak_ptr.h"
class GURL;
namespace network {
class SimpleURLLoader;
}
namespace ash {
class QuickInsertAssetFetcherImplDelegate;
class ASH_EXPORT QuickInsertAssetFetcherImpl : public QuickInsertAssetFetcher {
public:
explicit QuickInsertAssetFetcherImpl(
QuickInsertAssetFetcherImplDelegate* delegate);
QuickInsertAssetFetcherImpl(const QuickInsertAssetFetcherImpl&) = delete;
QuickInsertAssetFetcherImpl& operator=(const QuickInsertAssetFetcherImpl&) =
delete;
~QuickInsertAssetFetcherImpl() override;
std::unique_ptr<network::SimpleURLLoader> FetchGifFromUrl(
const GURL& url,
size_t rank,
QuickInsertGifFetchedCallback callback) override;
std::unique_ptr<network::SimpleURLLoader> FetchGifPreviewImageFromUrl(
const GURL& url,
size_t rank,
QuickInsertImageFetchedCallback callback) override;
void FetchFileThumbnail(const base::FilePath& path,
const gfx::Size& size,
FetchFileThumbnailCallback callback) override;
private:
raw_ptr<QuickInsertAssetFetcherImplDelegate> delegate_;
base::WeakPtrFactory<QuickInsertAssetFetcherImpl> weak_ptr_factory_{this};
};
}
#endif