BUILD.gn 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. # Copyright 2022 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("//build/config/linux/gtk/gtk.gni")
  5. import("//ui/qt/qt.gni")
  6. assert(is_linux)
  7. component("linux_ui") {
  8. defines = [ "IS_LINUX_UI_IMPL" ]
  9. public = [
  10. "cursor_theme_manager_observer.h",
  11. "device_scale_factor_observer.h",
  12. "linux_ui.h",
  13. "linux_ui_delegate.h",
  14. "linux_ui_delegate_stub.h",
  15. "nav_button_provider.h",
  16. "status_icon_linux.h",
  17. "window_button_order_observer.h",
  18. "window_frame_provider.h",
  19. ]
  20. sources = [
  21. "linux_ui.cc",
  22. "linux_ui_delegate.cc",
  23. "linux_ui_delegate_stub.cc",
  24. "status_icon_linux.cc",
  25. ]
  26. deps = [ "//base" ]
  27. public_deps = [ "//printing/buildflags" ]
  28. }
  29. source_set("linux_ui_impl") {
  30. public = [ "linux_ui_base.h" ]
  31. sources = [ "linux_ui_base.cc" ]
  32. public_deps = [ ":linux_ui" ]
  33. deps = [
  34. "//base",
  35. "//skia",
  36. "//ui/gfx",
  37. "//ui/native_theme",
  38. "//ui/shell_dialogs",
  39. ]
  40. }
  41. source_set("linux_ui_factory") {
  42. sources = [
  43. "linux_ui_factory.cc",
  44. "linux_ui_factory.h",
  45. ]
  46. public_deps = [ ":linux_ui" ]
  47. deps = [
  48. "//base",
  49. "//ui/base:buildflags",
  50. ]
  51. if (use_gtk) {
  52. # This is the only component that can interact with gtk.
  53. deps += [ "//ui/gtk" ]
  54. }
  55. if (use_qt) {
  56. deps += [ "//ui/qt" ]
  57. }
  58. }
  59. source_set("test_support") {
  60. testonly = true
  61. public = [ "fake_linux_ui.h" ]
  62. sources = [ "fake_linux_ui.cc" ]
  63. public_deps = [ ":linux_ui_impl" ]
  64. deps = [
  65. "//base",
  66. "//skia",
  67. "//ui/gfx",
  68. "//ui/native_theme",
  69. "//ui/shell_dialogs",
  70. ]
  71. }