chromium/content/services/auction_worklet/public/mojom/BUILD.gn

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

import("//mojo/public/tools/bindings/mojom.gni")

mojom("mojom") {
  cpp_only = true
  disable_variants = true

  # bider_worklet.mojom uses optional primitives, which are currently only
  # supported for C++. We need to explicitly disable fuzzing to prevent
  # generation of mojolpm and JS.
  enable_mojolpm_fuzzing = false
  enable_js_fuzzing = false

  sources = [
    "auction_network_events_handler.mojom",
    "auction_shared_storage_host.mojom",
    "auction_worklet_service.mojom",
    "bidder_worklet.mojom",
    "private_aggregation_request.mojom",
    "real_time_reporting.mojom",
    "reject_reason.mojom",
    "seller_worklet.mojom",
    "trusted_signals_cache.mojom",
  ]
  deps = [
    "//content/common:mojo_bindings",
    "//mojo/public/mojom/base",
    "//sandbox/policy/mojom",
    "//services/network/public/mojom",
    "//third_party/blink/public/mojom:mojom_platform",
    "//url/mojom:url_mojom_gurl",
  ]
  overridden_deps = [ "//third_party/blink/public/mojom:mojom_platform" ]
  component_deps = [ "//third_party/blink/public/common" ]

  component_output_prefix =
      "content_services_auction_worklet_public_mojo_bindings"
  export_class_attribute = "CONTENT_EXPORT"
  export_define = "CONTENT_IMPLEMENTATION=1"
  export_header = "content/common/content_export.h"
}

# See comment at the top of //content/BUILD.gn for how this works.
group("for_content_tests") {
  visibility = [ "//content/test/*" ]
  if (!is_component_build) {
    public_deps = [ ":mojom" ]
  } else {
    # Normally this won't happen for component builds, but mojo shared gets its
    # own component, so the usual "it's all content/" logic doesn't apply.
    public_deps = [ ":mojom_shared" ]
  }
}