summaryrefslogtreecommitdiff
path: root/chromium/printing/mojom/BUILD.gn
blob: 029a1b8d76b9fe58ab812b6de357d03654596135 (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
# Copyright 2020 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")
import("//printing/buildflags/buildflags.gni")

mojom("mojom") {
  sources = [ "print.mojom" ]
}

if (enable_basic_printing) {
  mojom("printing_context") {
    sources = [ "printing_context.mojom" ]

    public_deps = [ "//ui/gfx/geometry/mojom" ]

    cpp_typemaps = [
      {
        types = [
          {
            mojom = "printing.mojom.PageMargins"
            cpp = "::printing::PageMargins"
          },
          {
            mojom = "printing.mojom.PageSetup"
            cpp = "::printing::PageSetup"
          },
          {
            mojom = "printing.mojom.PageRange"
            cpp = "::printing::PageRange"
          },
          {
            mojom = "printing.mojom.RequestedMedia"
            cpp = "::printing::PrintSettings::RequestedMedia"
          },
        ]
        traits_sources = [ "printing_context_mojom_traits.cc" ]
        traits_headers = [ "printing_context_mojom_traits.h" ]
        traits_deps = [
          "//printing",
          "//ui/gfx/geometry",
        ]
      },
    ]
  }
}