summaryrefslogtreecommitdiffstats
path: root/chromium/components/webrtc/BUILD.gn
blob: b9e6f308e9fe7d2d71d6b5175483b35c5385ce36 (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
# 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.

if (is_android) {
  import("//build/config/android/rules.gni")
}

if (!is_ios) {
  source_set("media_stream_device_enumerator") {
    sources = [
      "media_stream_device_enumerator.h",
      "media_stream_device_enumerator_impl.cc",
      "media_stream_device_enumerator_impl.h",
    ]

    deps = [
      "//base",
      "//content/public/browser",
      "//third_party/blink/public/common",
    ]
  }

  source_set("webrtc") {
    sources = [
      "media_stream_devices_controller.cc",
      "media_stream_devices_controller.h",
    ]

    public_deps = [ ":media_stream_device_enumerator" ]

    deps = [
      "//base",
      "//components/content_settings/core/common",
      "//components/permissions",
      "//content/public/browser",
      "//third_party/blink/public/common",
    ]
    if (is_android) {
      deps += [ "//ui/android" ]
    }
  }
}

source_set("fake_ssl_socket") {
  visibility = [
    ":*",
    "//services/network:*",
  ]
  sources = [
    "fake_ssl_client_socket.cc",
    "fake_ssl_client_socket.h",
  ]
  public_deps = [
    "//base",
    "//net",
    "//net/traffic_annotation",
  ]
}

source_set("net_address_utils") {
  sources = [
    "net_address_utils.cc",
    "net_address_utils.h",
  ]
  public_deps = [
    "//base",
    "//net",
    "//third_party/webrtc_overrides:webrtc_component",
  ]
}

source_set("thread_wrapper") {
  sources = [
    "thread_wrapper.cc",
    "thread_wrapper.h",
  ]
  public_deps = [
    "//base",
    "//third_party/webrtc_overrides:webrtc_component",
  ]
}

source_set("unit_tests") {
  testonly = true

  sources = [
    "fake_ssl_client_socket_unittest.cc",
    "thread_wrapper_unittest.cc",
  ]

  deps = [
    ":fake_ssl_socket",
    ":thread_wrapper",
    "//base/test:test_support",
    "//net:test_support",
    "//testing/gmock",
    "//testing/gtest",
    "//third_party/webrtc_overrides:metronome_like_task_queue_test",
  ]
}

if (is_android) {
  java_cpp_features("java_features_srcjar") {
    # External code should depend on ":components_webrtc_java" instead.
    visibility = [ ":*" ]
    sources = [ "//components/webrtc/thread_wrapper.cc" ]
    template =
        "//components/webrtc/java_templates/ComponentsWebRtcFeatures.java.tmpl"
  }
  android_library("components_webrtc_java") {
    srcjar_deps = [ ":java_features_srcjar" ]
  }
}