summaryrefslogtreecommitdiffstats
path: root/content/child/BUILD.gn
blob: e078d3a5c1e0fd506157c128c416120bdcc67fb3 (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
# Copyright 2014 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.

import("//build/config/crypto.gni")
import("//build/config/features.gni")
import("//build/config/ui.gni")
import("//content/child/child.gni")

source_set("child") {
  # Only targets in the content tree can depend directly on this target.
  visibility = [ "//content/*" ]

  sources = rebase_path(content_child_gypi_values.private_child_sources,
                        ".", "//content")

  deps = [
    "//base",
    "//components/tracing",
    "//mojo/environment:chromium",
    "//mojo/public/interfaces/application",
    "//skia",
    "//third_party/icu",
    "//ui/base",
    "//ui/gfx",
    "//ui/gfx/geometry",
    "//url",
  ]

  if (!use_default_render_theme) {
    sources -= [
      "webthemeengine_impl_default.cc",
      "webthemeengine_impl_default.h",
    ]
  }

  if (is_android) {
    deps += [
      "//third_party/android_tools:cpu_features",
    ]
  }

  if (!enable_plugins) {
    sources -= [
      "browser_font_resource_trusted.cc",
      "npapi/plugin_host.cc",
      "npapi/plugin_host.h",
      "npapi/plugin_instance.cc",
      "npapi/plugin_instance.h",
      "npapi/plugin_instance_mac.mm",
      "npapi/plugin_lib.cc",
      "npapi/plugin_lib.h",
      "npapi/plugin_stream.cc",
      "npapi/plugin_stream.h",
      "npapi/plugin_stream_posix.cc",
      "npapi/plugin_stream_url.cc",
      "npapi/plugin_stream_url.h",
      "npapi/plugin_stream_win.cc",
      "npapi/plugin_string_stream.cc",
      "npapi/plugin_string_stream.h",
      "npapi/plugin_url_fetcher.cc",
      "npapi/plugin_url_fetcher.h",
      "npapi/plugin_web_event_converter_mac.h",
      "npapi/plugin_web_event_converter_mac.mm",
      "npapi/webplugin.h",
      "npapi/webplugin_accelerated_surface_mac.h",
      "npapi/webplugin_delegate.h",
      "npapi/webplugin_delegate_impl.cc",
      "npapi/webplugin_delegate_impl.h",
      "npapi/webplugin_delegate_impl_android.cc",
      "npapi/webplugin_delegate_impl_aura.cc",
      "npapi/webplugin_delegate_impl_mac.mm",
      "npapi/webplugin_delegate_impl_win.cc",
      "npapi/webplugin_ime_win.cc",
      "npapi/webplugin_ime_win.h",
      "npapi/webplugin_resource_client.h",
    ]
  }

  configs += [
    "//content:content_implementation",
  ]

  if (is_ios) {
    # iOS only needs a small portion of content; exclude all the
    # implementation, and re-include what is used.
    sources = []
  } else {
    deps += [
      "//content/app/resources",
      "//content/app/strings",
      "//crypto:platform",
      "//third_party/WebKit/public:blink",
      "//third_party/WebKit/public:resources",
      "//third_party/npapi",
      "//webkit/child",
      "//storage/common",
    ]
  }

  if (use_aura && is_mac) {
    # This file is already excluded on non-Mac.
    sources -= [ "npapi/webplugin_delegate_impl_mac.mm" ]
  }

  if (is_win || !use_aura) {
    sources -= [ "npapi/webplugin_delegate_impl_aura.cc" ]
  }

  if (!use_openssl) {
    sources += rebase_path(content_child_gypi_values.webcrypto_nss_sources,
                           ".", "//content")
  } else {
    sources += rebase_path(content_child_gypi_values.webcrypto_openssl_sources,
                           ".", "//content")
  }
}