// Copyright 2015 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef MEDIA_VIDEO_MOCK_MAPPABLE_SHARED_IMAGE_VIDEO_FRAME_POOL_H_
#define MEDIA_VIDEO_MOCK_MAPPABLE_SHARED_IMAGE_VIDEO_FRAME_POOL_H_

#include "base/functional/callback.h"
#include "base/memory/raw_ptr.h"
#include "media/video/mappable_shared_image_video_frame_pool.h"
#include "testing/gmock/include/gmock/gmock.h"

namespace media {

class MockMappableSharedImageVideoFramePool
    : public MappableSharedImageVideoFramePool {
 public:
  explicit MockMappableSharedImageVideoFramePool(
      std::vector<base::OnceClosure>* frame_ready_cbs);
  ~MockMappableSharedImageVideoFramePool() override;

  void MaybeCreateHardwareFrame(scoped_refptr<VideoFrame> video_frame,
                                FrameReadyCB frame_ready_cb) override;
  MOCK_METHOD0(Abort, void());

 private:
  raw_ptr<std::vector<base::OnceClosure>> frame_ready_cbs_;
};

}  // namespace media

#endif  // MEDIA_VIDEO_MOCK_MAPPABLE_SHARED_IMAGE_VIDEO_FRAME_POOL_H_
