chromium/services/webnn/webnn_buffer_impl.h

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

#ifndef SERVICES_WEBNN_WEBNN_BUFFER_IMPL_H_
#define SERVICES_WEBNN_WEBNN_BUFFER_IMPL_H_

#include "base/component_export.h"
#include "mojo/public/cpp/base/big_buffer.h"
#include "mojo/public/cpp/bindings/associated_receiver.h"
#include "mojo/public/cpp/bindings/pending_associated_receiver.h"
#include "services/webnn/public/cpp/operand_descriptor.h"
#include "services/webnn/public/mojom/webnn_buffer.mojom.h"
#include "services/webnn/webnn_object_impl.h"

namespace webnn {

class WebNNContextImpl;

// GPU process implementation of the MLBuffer interface exposed to script.
// Owned by the WebNNContextImpl which created it.
class COMPONENT_EXPORT(WEBNN_SERVICE) WebNNBufferImpl
    : public mojom::WebNNBuffer,
      public WebNNObjectImpl<blink::WebNNBufferToken> {};

}  // namespace webnn

#endif  // SERVICES_WEBNN_WEBNN_BUFFER_IMPL_H_