summaryrefslogtreecommitdiff
path: root/chromium/remoting/signaling/BUILD.gn
blob: 2e0d4e0a7c3d7bea09caecce7c868853256bdcd6 (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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# Copyright 2015 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.

static_library("signaling") {
  sources = [
    "delegating_signal_strategy.cc",
    "delegating_signal_strategy.h",
    "ftl_client_uuid_device_id_provider.cc",
    "ftl_client_uuid_device_id_provider.h",
    "ftl_device_id_provider.h",
    "ftl_grpc_context.cc",
    "ftl_grpc_context.h",
    "ftl_host_device_id_provider.cc",
    "ftl_host_device_id_provider.h",
    "ftl_message_reception_channel.cc",
    "ftl_message_reception_channel.h",
    "ftl_messaging_client.cc",
    "ftl_messaging_client.h",
    "ftl_registration_manager.cc",
    "ftl_registration_manager.h",
    "ftl_signal_strategy.cc",
    "ftl_signal_strategy.h",
    "iq_sender.cc",
    "iq_sender.h",
    "message_reception_channel.h",
    "message_tracker.cc",
    "message_tracker.h",
    "messaging_client.h",
    "push_notification_subscriber.cc",
    "push_notification_subscriber.h",
    "registration_manager.h",
    "remoting_log_to_server.cc",
    "remoting_log_to_server.h",
    "server_log_entry.cc",
    "server_log_entry.h",
    "signal_strategy.cc",
    "signal_strategy.h",
    "signaling_address.cc",
    "signaling_address.h",
    "signaling_id_util.cc",
    "signaling_id_util.h",
    "xmpp_log_to_server.cc",
    "xmpp_log_to_server.h",
  ]

  configs += [
    "//build/config/compiler:no_size_t_to_int_warning",
    "//build/config/compiler:wexit_time_destructors",
    "//remoting/build/config:version",
  ]

  public_deps = [
    "//remoting/proto",
    "//remoting/proto/ftl/v1:ftl_grpc_library",
    "//remoting/proto/remoting/v1:telemetry_grpc_library",
    "//third_party/libjingle_xmpp",
    "//third_party/webrtc_overrides",
  ]

  deps = [
    "//base",
    "//crypto",
    "//google_apis",
    "//jingle:webrtc_glue",
    "//net",
    "//remoting/base",
    "//remoting/base/grpc_support",
    "//remoting/proto/remoting/v1:telemetry_messages",
    "//third_party/grpc:grpcpp",
  ]

  if (is_nacl) {
    sources -= [
      "ftl_client_uuid_device_id_provider.cc",
      "ftl_client_uuid_device_id_provider.h",
      "ftl_grpc_context.cc",
      "ftl_grpc_context.h",
      "ftl_host_device_id_provider.cc",
      "ftl_host_device_id_provider.h",
      "ftl_message_reception_channel.cc",
      "ftl_message_reception_channel.h",
      "ftl_messaging_client.cc",
      "ftl_messaging_client.h",
      "ftl_registration_manager.cc",
      "ftl_registration_manager.h",
      "ftl_signal_strategy.cc",
      "ftl_signal_strategy.h",
      "remoting_log_to_server.cc",
      "remoting_log_to_server.h",
      "server_log_entry.cc",
      "xmpp_log_to_server.cc",
    ]
    deps -= [
      "//google_apis",
      "//remoting/base/grpc_support",
      "//third_party/grpc:grpcpp",
    ]
    public_deps -= [
      "//remoting/proto/ftl/v1:ftl_grpc_library",
      "//remoting/proto/remoting/v1:telemetry_grpc_library",
    ]
  }
}

static_library("test_support") {
  testonly = true

  sources = [
    "fake_signal_strategy.cc",
    "fake_signal_strategy.h",
    "mock_signal_strategy.cc",
    "mock_signal_strategy.h",
  ]

  public_deps = [
    ":signaling",
    "//testing/gmock",
  ]
}

source_set("unit_tests") {
  testonly = true

  sources = [
    "ftl_message_reception_channel_unittest.cc",
    "ftl_messaging_client_unittest.cc",
    "ftl_registration_manager_unittest.cc",
    "ftl_signal_strategy_unittest.cc",
    "iq_sender_unittest.cc",
    "message_tracker_unittest.cc",
    "push_notification_subscriber_unittest.cc",
    "remoting_log_to_server_unittest.cc",
    "server_log_entry_unittest.cc",
    "server_log_entry_unittest.h",
    "signaling_address_unittest.cc",
    "signaling_id_util_unittest.cc",
    "xmpp_log_to_server_unittest.cc",
  ]

  deps = [
    ":test_support",
    "//net:test_support",
    "//remoting/base/grpc_support:unit_tests",
    "//testing/gmock",
    "//testing/gtest",
  ]
}