#ifndef ASH_PUBLIC_CPP_TEST_TEST_IMAGE_DECODER_H_
#define ASH_PUBLIC_CPP_TEST_TEST_IMAGE_DECODER_H_
#include <memory>
#include "mojo/public/cpp/bindings/receiver_set.h"
#include "services/data_decoder/public/cpp/service_provider.h"
#include "services/data_decoder/public/mojom/data_decoder_service.mojom.h"
#include "third_party/skia/include/core/SkColor.h"
class SkBitmap;
namespace ash {
class TestImageDecoder : public data_decoder::ServiceProvider {
public:
using AnimationCallback = base::RepeatingCallback<
std::vector<data_decoder::mojom::AnimationFramePtr>()>;
using ImageCallback = base::RepeatingCallback<SkBitmap()>;
TestImageDecoder(AnimationCallback test_frames_callback,
ImageCallback test_image_callback);
TestImageDecoder(const TestImageDecoder&) = delete;
TestImageDecoder& operator=(const TestImageDecoder&) = delete;
~TestImageDecoder() override;
void BindDataDecoderService(
mojo::PendingReceiver<data_decoder::mojom::DataDecoderService> receiver)
override;
private:
class DataDecoderServiceImpl;
const std::unique_ptr<DataDecoderServiceImpl> service_;
mojo::ReceiverSet<data_decoder::mojom::DataDecoderService> receivers_;
};
}
#endif