chromium/media/learning/mojo/public/mojom/BUILD.gn

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

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

mojom("mojom") {
  generate_java = true
  sources = [
    "learning_task_controller.mojom",
    "learning_types.mojom",
  ]

  public_deps = [ "//mojo/public/mojom/base" ]

  export_class_attribute_blink = "BLINK_PLATFORM_EXPORT"
  export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1"
  export_header_blink = "third_party/blink/public/platform/web_common.h"

  shared_learning_types_cpp_typemap = {
    types = [
      {
        mojom = "media.learning.mojom.LabelledExample"
        cpp = "::media::learning::LabelledExample"
      },
      {
        mojom = "media.learning.mojom.FeatureValue"
        cpp = "::media::learning::FeatureValue"
      },
      {
        mojom = "media.learning.mojom.TargetValue"
        cpp = "::media::learning::TargetValue"
      },
      {
        mojom = "media.learning.mojom.ObservationCompletion"
        cpp = "::media::learning::ObservationCompletion"
      },
      {
        mojom = "media.learning.mojom.TargetHistogramPair"
        cpp = "::media::learning::TargetHistogramPair"
      },
      {
        mojom = "media.learning.mojom.TargetHistogram"
        cpp = "::media::learning::TargetHistogram"
      },
    ]
    traits_headers =
        [ "//media/learning/mojo/public/cpp/learning_mojom_traits.h" ]
    traits_public_deps = [
      "//media/learning/common",
      "//media/learning/mojo/public/cpp:shared_typemap_traits",
    ]
  }

  cpp_typemaps = [ shared_learning_types_cpp_typemap ]
  blink_cpp_typemaps = [ shared_learning_types_cpp_typemap ]
}