BUILD.gn 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. # Copyright 2014 The Chromium Authors. All rights reserved.
  2. # Use of this source code is governed by a BSD-style license that can be
  3. # found in the LICENSE file.
  4. import("//mojo/public/tools/bindings/mojom.gni")
  5. mojom("mojom") {
  6. generate_java = true
  7. sources = [
  8. "event.mojom",
  9. "event_constants.mojom",
  10. "keyboard_codes.mojom",
  11. "scroll_granularity.mojom",
  12. ]
  13. public_deps = [
  14. "//mojo/public/mojom/base",
  15. "//ui/gfx/geometry/mojom",
  16. "//ui/latency/mojom",
  17. ]
  18. shared_cpp_typemaps = [
  19. {
  20. types = [
  21. {
  22. mojom = "ui.mojom.EventPointerType"
  23. cpp = "::ui::EventPointerType"
  24. },
  25. {
  26. mojom = "ui.mojom.ScrollGranularity"
  27. cpp = "::ui::ScrollGranularity"
  28. },
  29. ]
  30. traits_headers = [ "//ui/events/ipc/ui_events_param_traits_macros.h" ]
  31. traits_public_deps = [ "//ui/events/ipc" ]
  32. },
  33. ]
  34. cpp_typemaps = shared_cpp_typemaps
  35. cpp_typemaps += [
  36. {
  37. types = [
  38. # TODO(crbug.com/617167): Map directly to ui::Event.
  39. {
  40. mojom = "ui.mojom.Event"
  41. cpp = "::std::unique_ptr<::ui::Event>"
  42. move_only = true
  43. },
  44. {
  45. mojom = "ui.mojom.EventMomentumPhase"
  46. cpp = "::ui::EventMomentumPhase"
  47. },
  48. {
  49. mojom = "ui.mojom.PointerDetails"
  50. cpp = "::ui::PointerDetails"
  51. },
  52. {
  53. mojom = "ui.mojom.ScrollEventPhase"
  54. cpp = "::ui::ScrollEventPhase"
  55. },
  56. {
  57. mojom = "ui.mojom.GestureDeviceType"
  58. cpp = "::ui::GestureDeviceType"
  59. },
  60. ]
  61. traits_sources = [ "event_mojom_traits.cc" ]
  62. traits_headers = [ "//ui/events/event.h" ]
  63. traits_private_headers = [ "event_mojom_traits.h" ]
  64. traits_public_deps = [
  65. "//ui/events",
  66. "//ui/events:dom_keycode_converter",
  67. "//ui/gfx/geometry/mojom",
  68. "//ui/latency/mojom",
  69. ]
  70. traits_deps = [ "//ipc:param_traits" ]
  71. },
  72. ]
  73. blink_cpp_typemaps = shared_cpp_typemaps
  74. }