#ifndef GPU_WEBGPU_CALLBACK_H_
#define GPU_WEBGPU_CALLBACK_H_
#include <memory>
#include "base/functional/callback.h"
#include "base/functional/callback_helpers.h"
#include "base/types/is_instantiation.h"
namespace gpu::webgpu {
template <typename Callback>
class WGPUCallbackBase;
template <typename Callback>
class WGPUOnceCallback;
template <typename Callback>
class WGPURepeatingCallback;
WGPUCallbackBase<BaseCallbackTemplate<R (Args...)>>;
WGPUOnceCallback<R (Args...)>;
WGPURepeatingCallback<R (Args...)>;
template <typename CallbackType>
requires base::is_instantiation<base::OnceCallback, CallbackType>
auto MakeWGPUOnceCallback(CallbackType&& cb) { … }
template <typename FunctionType, typename... BoundParameters>
requires(!base::internal::kIsWeakMethod<
base::internal::FunctorTraits<FunctionType,
BoundParameters...>::is_method,
BoundParameters...>)
auto BindWGPUOnceCallback(FunctionType&& function,
BoundParameters&&... bound_parameters) { … }
template <typename CallbackType>
requires base::is_instantiation<base::RepeatingCallback, CallbackType>
auto MakeWGPURepeatingCallback(CallbackType&& cb) { … }
template <typename FunctionType, typename... BoundParameters>
auto BindWGPURepeatingCallback(FunctionType&& function,
BoundParameters&&... bound_parameters) { … }
}
#endif