chromium/third_party/blink/public/mojom/usb/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("//mojo/public/tools/bindings/mojom.gni")

mojom("usb") {
  generate_java = true

  # Ideally, this mojom file should be compiled directly in "mojom_platform"
  # target in the parent directory. But as we need |scramble_message_ids| to
  # be "false" for its mojom JS file will be used in external WPT tests.
  # To limit this option's influence scope, we make it a separate target.
  sources = [ "web_usb_service.mojom" ]

  deps = [
    "//mojo/public/mojom/base",
    "//services/device/public/mojom:usb",
  ]

  # USB Mojom interfaces are exposed publicly to web tests which use
  # prepackaged redistributable JS bindings. It is therefore not desirable to
  # scramble these messages.
  scramble_message_ids = false

  export_class_attribute = "BLINK_COMMON_EXPORT"
  export_define = "BLINK_COMMON_IMPLEMENTATION=1"
  export_header = "third_party/blink/public/common/common_export.h"

  export_class_attribute_blink = "PLATFORM_EXPORT"
  export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1"
  export_header_blink = "third_party/blink/renderer/platform/platform_export.h"
}