// services/webnn/public/mojom/webnn_graph_builder.mojom-test-utils.h is auto generated by mojom_bindings_generator.py, do not edit

// Copyright 2019 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_PUBLIC_MOJOM_WEBNN_GRAPH_BUILDER_MOJOM_TEST_UTILS_H_
#define SERVICES_WEBNN_PUBLIC_MOJOM_WEBNN_GRAPH_BUILDER_MOJOM_TEST_UTILS_H_

#include "services/webnn/public/mojom/webnn_graph_builder.mojom.h"
#include "base/component_export.h"


namespace webnn::mojom {


class COMPONENT_EXPORT(WEBNN_MOJOM) WebNNGraphBuilderInterceptorForTesting : public WebNNGraphBuilder {
  virtual WebNNGraphBuilder* GetForwardingInterface() = 0;
  void CreatePendingConstant(const ::blink::WebNNPendingConstantToken& constant_handle, ::webnn::OperandDataType data_type, ::mojo_base::BigBuffer data) override;
  void CreateGraph(::webnn::mojom::GraphInfoPtr graph_info, CreateGraphCallback callback) override;
  void IsValidGraphForTesting(const ::webnn::ContextProperties& context_properties, ::webnn::mojom::GraphInfoPtr graph_info, IsValidGraphForTestingCallback callback) override;
};
class COMPONENT_EXPORT(WEBNN_MOJOM) WebNNGraphBuilderAsyncWaiter {
 public:
  explicit WebNNGraphBuilderAsyncWaiter(WebNNGraphBuilder* proxy);

  WebNNGraphBuilderAsyncWaiter(const WebNNGraphBuilderAsyncWaiter&) = delete;
  WebNNGraphBuilderAsyncWaiter& operator=(const WebNNGraphBuilderAsyncWaiter&) = delete;

  ~WebNNGraphBuilderAsyncWaiter();
  void CreateGraph(
      ::webnn::mojom::GraphInfoPtr graph_info,
base::expected<
  CreateGraphSuccessPtr,
  ::webnn::mojom::ErrorPtr>* out_result);
  WebNNGraphBuilder_CreateGraph_ResponseParam_ResultPtr CreateGraph(::webnn::mojom::GraphInfoPtr graph_info);
  void IsValidGraphForTesting(
      const ::webnn::ContextProperties& context_properties, ::webnn::mojom::GraphInfoPtr graph_info, bool* out_is_valid);
  bool IsValidGraphForTesting(const ::webnn::ContextProperties& context_properties, ::webnn::mojom::GraphInfoPtr graph_info);

 private:
  WebNNGraphBuilder* const proxy_;
};




}  // webnn::mojom

#endif  // SERVICES_WEBNN_PUBLIC_MOJOM_WEBNN_GRAPH_BUILDER_MOJOM_TEST_UTILS_H_