Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / chrome / renderer / BUILD.gn
blobfef95078847bbc2adf2e4d19c8da20923d56d675
1 # Copyright 2014 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.
5 import("//build/config/features.gni")
6 import("//tools/grit/grit_rule.gni")
8 gypi_values = exec_script(
9     "//build/gypi_to_gn.py",
10     [ rebase_path("../chrome_renderer.gypi") ],
11     "scope",
12     [ "../chrome_renderer.gypi" ])
14 # GYP version: chrome/chrome_resources.gyp:chrome_resources
15 # (generate_renderer_resources action)
16 grit("resources") {
17   source = "resources/renderer_resources.grd"
18   output_dir = "$root_gen_dir/chrome"
19   output_name = "renderer_resources"
20   outputs = [
21     "grit/renderer_resources.h",
22     "renderer_resources_100_percent.pak",
23     "renderer_resources_200_percent.pak",
24   ]
27 static_library("renderer") {
28   sources = rebase_path(gypi_values.chrome_renderer_sources, ".", "..")
30   defines = []
32   deps = [
33     "//base/allocator",
34     "//chrome/common",
35     "//chrome/common/net",
36     "//chrome:resources",
37     "//chrome:strings",
38     "//components/autofill/content/renderer",
39     "//components/cdm/renderer",
40     "//components/data_reduction_proxy/common",
41     "//components/password_manager/content/renderer",
42     "//components/plugins/renderer",
43     "//components/startup_metric_utils",
44     "//components/translate/content/renderer",
45     "//components/translate/core/common",
46     "//components/translate/core/language_detection",
47     "//components/visitedlink/renderer",
48     "//content/app/resources",
49     "//content/app/strings",
50     "//content/public/renderer",
51     "//extensions:extensions_resources",
52     "//extensions/renderer",
53     "//media/cast:net",
54     "//media/cast:sender",
55     "//media/cast/logging/proto",
56     "//net",
57     "//skia",
58     "//third_party/WebKit/public:blink",
59     "//third_party/WebKit/public:resources",
60     "//third_party/icu",
61     "//third_party/npapi",
62     "//third_party/re2",
63     "//third_party/widevine/cdm:version_h",
64     "//ui/surface",
65     "//v8:v8",
66     "//webkit/child",
67     "//webkit/common",
68   ]
70   if (enable_nacl) {
71     deps += [
72       #'../components/nacl.gyp:nacl',  TODO(GYP)
73       #'../components/nacl.gyp:nacl_renderer',  TODO(GYP)
74     ]
75   }
77   if (enable_plugins) {
78     sources += rebase_path(gypi_values.chrome_renderer_plugin_sources,
79                            ".", "..")
80     deps += [
81       "//ppapi:ppapi_host",
82       "//ppapi:ppapi_ipc",
83       "//ppapi:ppapi_proxy",
84       "//ppapi:ppapi_shared",
85     ]
86   }
88   if (safe_browsing_mode == 1) {
89     sources += rebase_path(gypi_values.chrome_renderer_safe_browsing_sources,
90                            ".", "..")
91     sources += rebase_path(
92         gypi_values.chrome_renderer_basic_safe_browsing_sources,
93         ".", "..")
94     defines += [ "FULL_SAFE_BROWSING" ]
95     deps += [
96       "//chrome/common/safe_browsing:proto",
97       "//third_party/smhasher:murmurhash3",
98     ]
99   }
100   if (safe_browsing_mode == 2) {
101     sources += rebase_path(
102         gypi_values.chrome_renderer_basic_safe_browsing_sources,
103         ".", "..")
104     defines += [ "MOBILE_SAFE_BROWSING" ]
105   }
107   if (enable_extensions) {
108     sources += rebase_path(gypi_values.chrome_renderer_extensions_sources,
109                            ".", "..")
110   }
111   if (enable_webrtc) {
112     sources += rebase_path(gypi_values.chrome_renderer_webrtc_sources,
113                            ".", "..")
114   }
115   if (enable_extensions && enable_webrtc) {
116     sources += rebase_path(
117         gypi_values.chrome_renderer_webrtc_extensions_sources, ".", "..")
118   }
119   if (enable_spellcheck) {
120     sources += rebase_path(gypi_values.chrome_renderer_spellchecker_sources,
121                            ".", "..")
122     deps += [ "//third_party/hunspell" ]
123   }
125   if (printing_mode > 0) {
126     deps += [ "//printing" ]
127     sources += rebase_path(gypi_values.chrome_renderer_printing_sources,
128                            ".", "..")
129     if (printing_mode == 1) {
130       sources += rebase_path(gypi_values.chrome_renderer_full_printing_sources,
131                              ".", "..")
132     }
133   }
135   if (is_mac) {
136     deps += [ "//third_party/mach_override" ]
137   }
138   if (is_win) {
139     deps += [
140       #'../chrome_elf/chrome_elf.gyp:chrome_elf',  TODO(GYP)
141       "//third_party/wtl",
142     ]
143   }
144   if (!is_android) {
145     sources += rebase_path(gypi_values.chrome_renderer_non_android_sources,
146                            ".", "..")
147   }
148   if (!is_ios) {
149     deps += [
150       # TODO(hclam): See crbug.com/298380 for details.
151       # We should isolate the APIs needed by the renderer.
152       "//chrome/common/extensions/api",
153     ]
154   }
156   # TODO(GYP)
157   #     ['win_pdf_metafile_for_printing==1', {
158   #       'sources': [
159   #         'renderer/printing/print_web_view_helper_pdf_win.cc',
160   #       ],
161   #     }, {
162   #       'sources': [
163   #         'renderer/printing/print_web_view_helper_win.cc',
164   #       ],
165   #     }],