BUILD.gn 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. # Copyright 2018 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/chromeos/ui_mode.gni")
  5. import("//remoting/build/config/remoting_build.gni")
  6. source_set("file_transfer") {
  7. sources = [ "get_desktop_directory.h" ]
  8. public_deps = [ ":common" ]
  9. deps = [
  10. "//base",
  11. "//remoting/protocol",
  12. "//remoting/resources",
  13. ]
  14. if (is_mac) {
  15. sources += [
  16. "ensure_user_mac.cc",
  17. "file_chooser_mac.mm",
  18. ]
  19. deps += [ "//ui/base" ]
  20. frameworks = [ "AppKit.framework" ]
  21. }
  22. if (!is_mac && !is_win) {
  23. sources += [ "ensure_user_no_op.cc" ]
  24. }
  25. if (is_win) {
  26. sources += [
  27. "ensure_user_win.cc",
  28. "file_chooser_common_win.h",
  29. "file_chooser_main_win.cc",
  30. "file_chooser_win.cc",
  31. "get_desktop_directory_win.cc",
  32. ]
  33. deps += [
  34. "//ipc:ipc",
  35. "//remoting/host:common",
  36. "//remoting/host/base",
  37. "//remoting/host/mojom",
  38. "//remoting/host/win",
  39. ]
  40. } else {
  41. sources += [ "get_desktop_directory.cc" ]
  42. }
  43. if (is_chromeos_ash) {
  44. sources += [ "file_chooser_chromeos.cc" ]
  45. } else if (is_linux) {
  46. sources += [ "file_chooser_linux.cc" ]
  47. deps += [
  48. "//build/config/linux/gtk",
  49. "//ui/base:base",
  50. ]
  51. }
  52. }
  53. source_set("common") {
  54. public = [
  55. "buffered_file_writer.h",
  56. "ensure_user.h",
  57. "file_chooser.h",
  58. "file_operations.h",
  59. "file_transfer_message_handler.h",
  60. "get_desktop_directory.h",
  61. "ipc_file_operations.h",
  62. "local_file_operations.h",
  63. "rtc_log_file_operations.h",
  64. "session_file_operations_handler.h",
  65. ]
  66. sources = [
  67. "buffered_file_writer.cc",
  68. "file_transfer_message_handler.cc",
  69. "ipc_file_operations.cc",
  70. "local_file_operations.cc",
  71. "rtc_log_file_operations.cc",
  72. "session_file_operations_handler.cc",
  73. ]
  74. deps = [
  75. "//base",
  76. "//net:net",
  77. "//remoting/base:base",
  78. "//remoting/host/mojom",
  79. "//remoting/protocol",
  80. "//ui/base:base",
  81. "//url:url",
  82. ]
  83. }
  84. source_set("test_support") {
  85. testonly = true
  86. sources = [
  87. "ensure_user_no_op.cc",
  88. "fake_file_chooser.cc",
  89. "fake_file_chooser.h",
  90. "fake_file_operations.cc",
  91. "fake_file_operations.h",
  92. "get_desktop_directory.cc",
  93. "test_byte_vector_utils.h",
  94. ]
  95. deps = [
  96. ":common",
  97. "//base:base",
  98. "//remoting/protocol",
  99. ]
  100. }
  101. source_set("unit_tests") {
  102. testonly = true
  103. sources = [
  104. "buffered_file_writer_unittest.cc",
  105. "file_transfer_message_handler_unittest.cc",
  106. "ipc_file_operations_unittest.cc",
  107. "local_file_operations_unittest.cc",
  108. "rtc_log_file_operations_unittest.cc",
  109. ]
  110. deps = [
  111. ":common",
  112. ":test_support",
  113. "//base:base",
  114. "//base/test:test_support",
  115. "//net:net",
  116. "//remoting/base:base",
  117. "//remoting/host/mojom",
  118. "//remoting/protocol",
  119. "//remoting/protocol:test_support",
  120. "//testing/gtest",
  121. ]
  122. }