Default to current UI locale when recommended locales are invalid
[chromium-blink-merge.git] / content / renderer / BUILD.gn
blob014aa168c89f03bdcf64288bd5f9b2bd23526777
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("//build/config/ui.gni")
7 import("//content/renderer/renderer.gni")
9 source_set("renderer") {
10   # Only targets in the content tree can depend directly on this target.
11   visibility = [ "//content/*" ]
13   sources = rebase_path(content_renderer_gypi_values.private_renderer_sources,
14                         ".", "//content")
16   configs += [
17     "//content:content_implementation",
18     "//content:libjingle_stub_config",
19   ]
21   deps = [
22     # TODO(GYP) bug 376846 remove this. This should be inherited from //net but
23     # those don't cross component boundaries.
24     "//crypto:platform",
26     "//base/allocator",
27     "//cc/blink",
28     "//content:resources",
29     "//content/common:mojo_bindings",
30     "//gin",
31     "//jingle:jingle_glue",
32     "//media",
33     "//mojo/bindings/js",
34     "//mojo/environment:chromium",
35     "//mojo/public/js/bindings",
36     "//mojo/public/interfaces/application",
37     "//net",
38     "//skia",
39     "//third_party/icu",
40     "//third_party/npapi",
41     "//third_party/WebKit/public:blink",
42     "//third_party/widevine/cdm:version_h",
43     "//ui/accessibility",
44     "//ui/events:dom4_keycode_converter",
45     "//ui/native_theme",
46     "//ui/surface",
47     "//v8",
48     "//webkit/child",
49     "//webkit/common",
50     "//webkit/common:storage",
51     "//webkit/common/gpu",
52     #'../third_party/libjingle/libjingle.gyp:libjingle',  TODO(GYP)
53   ]
55   if (!enable_notifications) {
56     sources -= [
57       "notification_provider.cc",
58       "active_notification_tracker.cc",
59     ]
60   }
62   if (is_mac) {
63     sources -= [
64       "webscrollbarbehavior_impl_gtkoraura.cc",
65       "webscrollbarbehavior_impl_gtkoraura.h",
66     ]
67     sources += [
68       "external_popup_menu.cc",
69       "external_popup_menu.h",
70     ]
71   }
73   if (is_android) {
74     sources -= [
75       "accessibility/renderer_accessibility_focus_only.cc",
76       "media/audio_decoder.cc",
77       "media/webmediaplayer_impl.cc",
78     ]
79     sources += [
80       "external_popup_menu.cc",
81       "external_popup_menu.h",
82     ]
84     # Add back the Linux file which Android shares.
85     set_sources_assignment_filter([])
86     sources += [
87       "render_view_linux.cc",
88     ]
90     deps += [
91       "//third_party/android_tools:cpu_features",
92       "//third_party/libphonenumber",
93     ]
94   } else {
95     sources -= [
96       "java/gin_java_bridge_dispatcher.cc",
97       "java/gin_java_bridge_dispatcher.h",
98       "java/gin_java_bridge_object.cc",
99       "java/gin_java_bridge_object.h",
100       "java/gin_java_bridge_value_converter.cc",
101       "java/gin_java_bridge_value_converter.h",
102     ]
103   }
105   # TODO(jrg): remove the OS=="android" section?
106   # http://crbug.com/113172
107   # Understand better how media_stream_ is tied into Chromium.
108   if (!enable_webrtc && is_android) {
109     sources -= [
110       "media/media_stream_audio_level_calculator.cc",
111       "media/media_stream_audio_level_calculator.h",
112       "media/media_stream_audio_renderer.cc",
113       "media/media_stream_audio_renderer.h",
114       "media/media_stream_center.h",
115       "media/media_stream_constraints_util.cc",
116       "media/media_stream_constraints_util.h",
117       "media/media_stream_dispatcher.h",
118       "media/media_stream_dispatcher_eventhandler.h",
119       "media/media_stream_impl.h",
120       "media/media_stream_track.cc",
121       "media/media_stream_track.h",
122     ]
123   }
125   if (enable_webrtc) {
126     sources += rebase_path(
127         content_renderer_gypi_values.private_renderer_webrtc_sources,
128         ".", "//content")
129     deps += [
130       "//crypto",
131       "//third_party/libyuv",
132       #"../third_party/libjingle/libjingle.gyp:libjingle_webrtc",  TODO(GYP)
133       #"../third_party/libjingle/libjingle.gyp:libpeerconnection",  TODO(GYP)
134       #"../third_party/webrtc/modules/modules.gyp:audio_device",  TODO(GYP)
135       #"../third_party/webrtc/modules/modules.gyp:audio_processing",  TODO(GYP)
136     ]
137   } else {
138     sources += [
139       "media/webrtc_logging_noop.cc",
140       "media/webrtc_logging.h",
141     ]
142   }
144   if (enable_plugins) {
145     sources += rebase_path(
146         content_renderer_gypi_values.private_renderer_plugin_sources,
147         ".", "//content")
148     deps += [
149       "//ppapi:ppapi_host",
150       "//ppapi:ppapi_proxy",
151       "//ppapi:ppapi_shared",
152       "//third_party/libyuv",
153     ]
154   } else {
155     # These files are in the WebRTC list, but also require plugins.
156     if (enable_webrtc) {
157       sources -= [
158         "media/webrtc/video_destination_handler.cc",
159         "media/webrtc/video_destination_handler.h",
160       ]
161     }
162   }
164   if (enable_plugins && enable_webrtc) {
165     sources += rebase_path(
166         content_renderer_gypi_values.private_renderer_plugin_webrtc_sources,
167         ".", "//content")
168   }
170   if (printing_mode == 1) {
171     deps += [ "//printing" ]
172   }