summaryrefslogtreecommitdiff
path: root/chromium/ui/base/mojom/BUILD.gn
blob: dd4b545a49cc03d287f11da7140e1399d912a77a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Copyright 2016 The Chromium Authors. All rights reserved.
# 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") {
  generate_java = true
  sources = [
    "ui_base_types.mojom",
    "window_open_disposition.mojom",
  ]

  if (is_mac) {
    sources += [ "attributed_string.mojom" ]
    public_deps = [
      "//mojo/public/mojom/base",
      "//ui/gfx/range/mojom",
    ]
  }

  cpp_typemaps = [
    {
      types = [
        {
          mojom = "ui.mojom.DialogButton"
          cpp = "::ui::DialogButton"
        },
        {
          mojom = "ui.mojom.MenuSourceType"
          cpp = "::ui::MenuSourceType"
        },
        {
          mojom = "ui.mojom.ModalType"
          cpp = "::ui::ModalType"
        },
      ]
      traits_headers = [ "ui_base_types_mojom_traits.h" ]
      traits_public_deps = [ "//ui/base" ]
    },
    {
      types = [
        {
          mojom = "ui.mojom.WindowOpenDisposition"
          cpp = "::WindowOpenDisposition"
        },
      ]
      traits_headers = [ "window_open_disposition_mojom_traits.h" ]
      traits_public_deps = [ "//ui/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"
}