summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-12 17:07:12 +0000
committerjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-12 17:08:36 +0000
commit22fe91d3732cc46b9782792384bced33ffeee480 (patch)
tree4d6792df56f5f894166940038de1cdd11a46a124
parentf723adfa62d5a3f0fd7773aec0dcca30006834b8 (diff)
downloadchromium_src-22fe91d3732cc46b9782792384bced33ffeee480.zip
chromium_src-22fe91d3732cc46b9782792384bced33ffeee480.tar.gz
chromium_src-22fe91d3732cc46b9782792384bced33ffeee480.tar.bz2
GN: Make content_shell and webkit_unit_tests work in component build
Except for webrtc, this produces content_shell and webkit_unit_tests binaries that link and run successfully on linux. R=brettw@chromium.org Review URL: https://codereview.chromium.org/462983002 Cr-Commit-Position: refs/heads/master@{#289007} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289007 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--build/config/linux/BUILD.gn2
-rw-r--r--content/BUILD.gn3
-rw-r--r--content/browser/BUILD.gn1
-rw-r--r--content/common/BUILD.gn5
-rw-r--r--content/gpu/BUILD.gn5
-rw-r--r--content/public/browser/BUILD.gn13
-rw-r--r--content/renderer/BUILD.gn5
-rw-r--r--content/renderer/render_thread_impl.cc13
-rw-r--r--content/renderer/render_thread_impl.h6
-rw-r--r--content/renderer/render_view_impl.cc2
-rw-r--r--content/renderer/renderer_webkitplatformsupport_impl.cc5
-rw-r--r--google_apis/gcm/BUILD.gn2
-rw-r--r--ipc/mojo/BUILD.gn7
-rw-r--r--jingle/BUILD.gn10
-rw-r--r--media/BUILD.gn3
-rw-r--r--media/cast/BUILD.gn1
-rw-r--r--net/BUILD.gn12
-rw-r--r--sync/BUILD.gn1
-rw-r--r--third_party/boringssl/BUILD.gn2
-rw-r--r--ui/base/BUILD.gn1
-rw-r--r--ui/events/BUILD.gn30
-rw-r--r--ui/gfx/BUILD.gn2
-rw-r--r--ui/wm/BUILD.gn1
23 files changed, 95 insertions, 37 deletions
diff --git a/build/config/linux/BUILD.gn b/build/config/linux/BUILD.gn
index 7433c4e..938833d 100644
--- a/build/config/linux/BUILD.gn
+++ b/build/config/linux/BUILD.gn
@@ -107,7 +107,7 @@ config("xscrnsaver") {
}
config("xfixes") {
- libs = [ "xfixes" ]
+ libs = [ "Xfixes" ]
}
config("libcap") {
diff --git a/content/BUILD.gn b/content/BUILD.gn
index a2bd489..94c944d 100644
--- a/content/BUILD.gn
+++ b/content/BUILD.gn
@@ -14,7 +14,7 @@ content_shared_components = [
"//content/plugin",
"//content/ppapi_plugin",
"//content/public/app",
- "//content/public/browser",
+ "//content/public/browser:sources",
"//content/public/child",
"//content/public/common",
"//content/public/plugin",
@@ -28,6 +28,7 @@ if (is_component_build) {
deps = content_shared_components + [
"//content/app",
]
+ forward_dependent_configs_from = deps
}
} else {
group("content") {
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
index 87abb7f..1a4df4b 100644
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -23,6 +23,7 @@ source_set("browser") {
# Shared deps. See also non-iOS deps below.
deps = [
"//base",
+ "//base:base_static",
"//content:resources",
"//content/browser/service_worker:proto",
"//content/browser/speech/proto",
diff --git a/content/common/BUILD.gn b/content/common/BUILD.gn
index 02efe32..0f2a380 100644
--- a/content/common/BUILD.gn
+++ b/content/common/BUILD.gn
@@ -49,8 +49,6 @@ source_set("common") {
"//cc",
"//ipc",
"//ipc/mojo",
- "//mojo/environment:chromium",
- "//mojo/system",
# TODO: the dependency on gl_in_process_context should be decoupled from
# content and moved to android_webview. See crbug.com/365797.
"//gpu/command_buffer/client:gl_in_process_context",
@@ -61,7 +59,10 @@ source_set("common") {
"//gpu/skia_bindings",
"//media",
"//media:shared_memory_support",
+ "//mojo/environment:chromium",
"//mojo/public/interfaces/application",
+ "//mojo/system",
+ "//sandbox",
"//third_party/WebKit/public:blink",
"//ui/gl",
"//webkit/browser:storage",
diff --git a/content/gpu/BUILD.gn b/content/gpu/BUILD.gn
index 02f0de6..e8e39fe 100644
--- a/content/gpu/BUILD.gn
+++ b/content/gpu/BUILD.gn
@@ -2,6 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import("//build/config/ui.gni")
import("//content/content.gni")
# We don't support x64 prior to Win7 and D3DCompiler_43.dll is not needed on
@@ -51,6 +52,10 @@ source_set("gpu") {
if (is_chromeos && cpu_arch != "arm") {
configs += [ "//third_party/libva/libva_config" ]
}
+
+ if (use_x11) {
+ deps += [ "//ui/events/platform/x11" ]
+ }
}
if (need_d3dcompiler) {
diff --git a/content/public/browser/BUILD.gn b/content/public/browser/BUILD.gn
index 05cb6f1..378eed5 100644
--- a/content/public/browser/BUILD.gn
+++ b/content/public/browser/BUILD.gn
@@ -5,7 +5,18 @@
import("//content/browser/browser.gni")
import("//build/config/ui.gni")
-source_set("browser") {
+group("browser") {
+ if (is_component_build) {
+ deps = [ "//content" ]
+ } else {
+ deps = [ ":sources" ]
+ }
+ forward_dependent_configs_from = deps
+}
+
+source_set("sources") {
+ visibility = [ "//content", ":browser" ]
+
if (is_ios) {
# iOS doesn't get the normal file list and only takes these whitelisted
# files.
diff --git a/content/renderer/BUILD.gn b/content/renderer/BUILD.gn
index 24e0e54..605a675 100644
--- a/content/renderer/BUILD.gn
+++ b/content/renderer/BUILD.gn
@@ -149,6 +149,7 @@ source_set("renderer") {
"//ppapi:ppapi_host",
"//ppapi:ppapi_proxy",
"//ppapi:ppapi_shared",
+ "//third_party/libyuv",
]
} else {
# These files are in the WebRTC list, but also require plugins.
@@ -165,4 +166,8 @@ source_set("renderer") {
content_renderer_gypi_values.private_renderer_plugin_webrtc_sources,
".", "//content")
}
+
+ if (printing_mode == 1) {
+ deps += [ "//printing" ]
+ }
}
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 37fa090..a484c5c 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -81,13 +81,9 @@
#include "content/renderer/media/audio_renderer_mixer_manager.h"
#include "content/renderer/media/media_stream_center.h"
#include "content/renderer/media/midi_message_filter.h"
-#include "content/renderer/media/peer_connection_tracker.h"
#include "content/renderer/media/renderer_gpu_video_accelerator_factories.h"
-#include "content/renderer/media/rtc_peer_connection_handler.h"
#include "content/renderer/media/video_capture_impl_manager.h"
#include "content/renderer/media/video_capture_message_filter.h"
-#include "content/renderer/media/webrtc/peer_connection_dependency_factory.h"
-#include "content/renderer/media/webrtc_identity_service.h"
#include "content/renderer/net_info_helper.h"
#include "content/renderer/p2p/socket_dispatcher.h"
#include "content/renderer/render_frame_proxy.h"
@@ -152,6 +148,13 @@
#include "content/renderer/npapi/plugin_channel_host.h"
#endif
+#if defined(ENABLE_WEBRTC)
+#include "content/renderer/media/peer_connection_tracker.h"
+#include "content/renderer/media/rtc_peer_connection_handler.h"
+#include "content/renderer/media/webrtc/peer_connection_dependency_factory.h"
+#include "content/renderer/media/webrtc_identity_service.h"
+#endif
+
using base::ThreadRestrictions;
using blink::WebDocument;
using blink::WebFrame;
@@ -1457,10 +1460,12 @@ blink::WebMediaStreamCenter* RenderThreadImpl::CreateMediaStreamCenter(
return media_stream_center_;
}
+#if defined(ENABLE_WEBRTC)
PeerConnectionDependencyFactory*
RenderThreadImpl::GetPeerConnectionDependencyFactory() {
return peer_connection_factory_.get();
}
+#endif
GpuChannelHost* RenderThreadImpl::GetGpuChannel() {
if (!gpu_channel_.get())
diff --git a/content/renderer/render_thread_impl.h b/content/renderer/render_thread_impl.h
index 012e2a2..68828f6 100644
--- a/content/renderer/render_thread_impl.h
+++ b/content/renderer/render_thread_impl.h
@@ -270,6 +270,7 @@ class CONTENT_EXPORT RenderThreadImpl : public RenderThread,
blink::WebMediaStreamCenter* CreateMediaStreamCenter(
blink::WebMediaStreamCenterClient* client);
+#if defined(ENABLE_WEBRTC)
// Returns a factory used for creating RTC PeerConnection objects.
PeerConnectionDependencyFactory* GetPeerConnectionDependencyFactory();
@@ -281,6 +282,7 @@ class CONTENT_EXPORT RenderThreadImpl : public RenderThread,
P2PSocketDispatcher* p2p_socket_dispatcher() {
return p2p_socket_dispatcher_.get();
}
+#endif
VideoCaptureImplManager* video_capture_impl_manager() const {
return vc_manager_.get();
@@ -473,6 +475,7 @@ class CONTENT_EXPORT RenderThreadImpl : public RenderThread,
#endif
scoped_refptr<DevToolsAgentFilter> devtools_agent_message_filter_;
+#if defined(ENABLE_WEBRTC)
scoped_ptr<PeerConnectionDependencyFactory> peer_connection_factory_;
// This is used to communicate to the browser process the status
@@ -481,6 +484,7 @@ class CONTENT_EXPORT RenderThreadImpl : public RenderThread,
// Dispatches all P2P sockets.
scoped_refptr<P2PSocketDispatcher> p2p_socket_dispatcher_;
+#endif
// Used on the render thread.
scoped_ptr<VideoCaptureImplManager> vc_manager_;
@@ -552,7 +556,9 @@ class CONTENT_EXPORT RenderThreadImpl : public RenderThread,
scoped_ptr<base::MemoryPressureListener> memory_pressure_listener_;
+#if defined(ENABLE_WEBRTC)
scoped_ptr<WebRTCIdentityService> webrtc_identity_service_;
+#endif
// TODO(reveman): Allow AllocateGpuMemoryBuffer to be called from
// multiple threads. Current allocation mechanism for IOSurface
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 1910417..1b23b7a 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -88,7 +88,6 @@
#include "content/renderer/internal_document_state_data.h"
#include "content/renderer/media/audio_device_factory.h"
#include "content/renderer/media/video_capture_impl_manager.h"
-#include "content/renderer/media/webrtc/peer_connection_dependency_factory.h"
#include "content/renderer/memory_benchmarking_extension.h"
#include "content/renderer/mhtml_generator.h"
#include "content/renderer/net_info_helper.h"
@@ -227,6 +226,7 @@
#if defined(ENABLE_WEBRTC)
#include "content/renderer/media/rtc_peer_connection_handler.h"
+#include "content/renderer/media/webrtc/peer_connection_dependency_factory.h"
#endif
using blink::WebAXObject;
diff --git a/content/renderer/renderer_webkitplatformsupport_impl.cc b/content/renderer/renderer_webkitplatformsupport_impl.cc
index 829277e..7b50bb5 100644
--- a/content/renderer/renderer_webkitplatformsupport_impl.cc
+++ b/content/renderer/renderer_webkitplatformsupport_impl.cc
@@ -48,7 +48,6 @@
#include "content/renderer/media/renderer_webaudiodevice_impl.h"
#include "content/renderer/media/renderer_webmidiaccessor_impl.h"
#include "content/renderer/media/webcontentdecryptionmodule_impl.h"
-#include "content/renderer/media/webrtc/peer_connection_dependency_factory.h"
#include "content/renderer/render_thread_impl.h"
#include "content/renderer/renderer_clipboard_client.h"
#include "content/renderer/screen_orientation/screen_orientation_observer.h"
@@ -117,6 +116,10 @@
#define WebScrollbarBehaviorImpl blink::WebScrollbarBehavior
#endif
+#if defined(ENABLE_WEBRTC)
+#include "content/renderer/media/webrtc/peer_connection_dependency_factory.h"
+#endif
+
using blink::Platform;
using blink::WebAudioDevice;
using blink::WebBlobRegistry;
diff --git a/google_apis/gcm/BUILD.gn b/google_apis/gcm/BUILD.gn
index ee4f901..4913324 100644
--- a/google_apis/gcm/BUILD.gn
+++ b/google_apis/gcm/BUILD.gn
@@ -95,6 +95,7 @@ executable("mcs_probe") {
deps = [
":gcm",
+ ":proto",
":test_support",
"//base",
"//net",
@@ -120,6 +121,7 @@ test("gcm_unit_tests") {
]
deps = [
+ ":proto",
":test_support",
"//base",
"//base/test:run_all_unittests",
diff --git a/ipc/mojo/BUILD.gn b/ipc/mojo/BUILD.gn
index accc89d..d059b48 100644
--- a/ipc/mojo/BUILD.gn
+++ b/ipc/mojo/BUILD.gn
@@ -10,13 +10,15 @@ component("mojo") {
"ipc_message_pipe_reader.h",
]
+ defines = [ "IPC_MOJO_IMPLEMENTATION" ]
+
deps = [
"//base",
+ "//base/third_party/dynamic_annotations",
"//ipc",
+ "//mojo/environment:chromium",
"//mojo/public/cpp/bindings",
"//mojo/system",
- # TODO(viettrungluu): Needed for base/lazy_instance.h, which is suspect.
- "//base/third_party/dynamic_annotations",
]
}
@@ -28,7 +30,6 @@ test("ipc_mojo_unittests") {
deps = [
"//base",
- # TODO(viettrungluu): Needed for base/lazy_instance.h, which is suspect.
"//base/test:test_support",
"//base/third_party/dynamic_annotations",
"//ipc",
diff --git a/jingle/BUILD.gn b/jingle/BUILD.gn
index 5b8e96c..f64a764 100644
--- a/jingle/BUILD.gn
+++ b/jingle/BUILD.gn
@@ -4,12 +4,12 @@
import("//build/config/features.gni")
-jingle_includes = exec_script("//build/gypi_to_gn.py",
- [ rebase_path("jingle.gypi") ],
- "scope",
- [ "jingle.gypi" ])
-
if (enable_webrtc || !is_android) {
+ jingle_includes = exec_script("//build/gypi_to_gn.py",
+ [ rebase_path("jingle.gypi") ],
+ "scope",
+ [ "jingle.gypi" ])
+
# GYP version: jingle/jingle.gyp:jingle_glue
static_library("jingle_glue") {
sources = jingle_includes.jingle_glue_sources
diff --git a/media/BUILD.gn b/media/BUILD.gn
index 2871e72..b01e759 100644
--- a/media/BUILD.gn
+++ b/media/BUILD.gn
@@ -17,7 +17,7 @@ config("media_config") {
}
if (use_pulseaudio) {
defines += [ "USE_PULSEAUDIO" ]
- if (linux_link_pulseaudio) {
+ if (!linux_link_pulseaudio) {
defines += [ "DLOPEN_PULSEAUDIO" ]
}
}
@@ -570,6 +570,7 @@ test("media_unittests") {
# TODO(dalecurtis): Port the rest of Widevine stuff.
"//third_party/widevine/cdm:version_h",
"//ui/gfx:test_support",
+ "//url",
]
if (media_use_ffmpeg) {
deps += [
diff --git a/media/cast/BUILD.gn b/media/cast/BUILD.gn
index 95d0077..8d38089 100644
--- a/media/cast/BUILD.gn
+++ b/media/cast/BUILD.gn
@@ -220,6 +220,7 @@ source_set("test_support") {
"//third_party/libyuv",
"//third_party/mt19937ar",
"//ui/gfx",
+ "//ui/gfx/geometry",
]
}
diff --git a/net/BUILD.gn b/net/BUILD.gn
index 5609408..d9b2d39 100644
--- a/net/BUILD.gn
+++ b/net/BUILD.gn
@@ -688,7 +688,7 @@ source_set("test_support") {
deps = [
"//base",
"//base/test:test_support",
- "//crypto:platform",
+ "//crypto",
"//net",
"//net/tools/tld_cleanup",
"//testing/gmock",
@@ -720,7 +720,9 @@ source_set("test_support") {
]
}
- if (!use_nss_certs) {
+ if (use_nss_certs) {
+ deps += ["//crypto:platform" ]
+ } else {
sources -= [
"test/cert_test_util_nss.cc",
]
@@ -753,6 +755,7 @@ source_set("balsa") {
deps = [
":net",
"//base",
+ "//url",
]
}
@@ -846,7 +849,10 @@ if (!is_ios && !is_android) {
]
if (is_linux) {
- configs += [ "//build/config/linux:gconf" ]
+ configs += [
+ "//build/config/linux:gconf",
+ "//build/config/linux:glib",
+ ]
deps += [ "//build/config/linux:gio" ]
}
}
diff --git a/sync/BUILD.gn b/sync/BUILD.gn
index eaddfa9..02d38e1 100644
--- a/sync/BUILD.gn
+++ b/sync/BUILD.gn
@@ -396,6 +396,7 @@ source_set("sync_core") {
deps = [
"//base",
"//base:i18n",
+ "//base/third_party/dynamic_annotations",
"//crypto",
"//google_apis",
"//net",
diff --git a/third_party/boringssl/BUILD.gn b/third_party/boringssl/BUILD.gn
index 50d749a..bb48833 100644
--- a/third_party/boringssl/BUILD.gn
+++ b/third_party/boringssl/BUILD.gn
@@ -7,7 +7,7 @@ config("openssl_config") {
include_dirs = []
include_dirs += [ "src/include" ]
if (is_component_build) {
- defines += [
+ defines = [
"BORINGSSL_SHARED_LIBRARY",
]
}
diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn
index 76dcaa4..cd68336 100644
--- a/ui/base/BUILD.gn
+++ b/ui/base/BUILD.gn
@@ -289,6 +289,7 @@ component("base") {
"//net",
"//skia",
"//third_party/icu",
+ "//ui/events/platform",
"//ui/events:events_base",
"//ui/resources",
"//ui/strings",
diff --git a/ui/events/BUILD.gn b/ui/events/BUILD.gn
index 7a868b1..97ed855 100644
--- a/ui/events/BUILD.gn
+++ b/ui/events/BUILD.gn
@@ -239,9 +239,10 @@ source_set("test_support") {
deps = [
"//base",
"//skia",
+ "//ui/events/platform",
"//ui/gfx/geometry",
- ":events_base",
":events",
+ ":events_base",
":gesture_detection",
]
@@ -281,8 +282,23 @@ test("events_unittests") {
"x/events_x_unittest.cc",
]
+ deps = [
+ ":dom4_keycode_converter",
+ ":events",
+ ":events_base",
+ ":gesture_detection",
+ ":test_support",
+ "//base",
+ "//base/test:run_all_unittests",
+ "//skia",
+ "//testing/gtest",
+ "//ui/events/platform",
+ "//ui/gfx:test_support",
+ ]
+
if (use_x11) {
configs += [ "//build/config/linux:x11" ]
+ deps += [ "//ui/gfx/x" ]
} else {
sources -= [
"x/events_x_unittest.cc",
@@ -301,16 +317,4 @@ test("events_unittests") {
"gestures/gesture_provider_aura_unittest.cc",
]
}
-
- deps = [
- ":events",
- ":events_base",
- ":gesture_detection",
- ":test_support",
- "//base",
- "//base/test:run_all_unittests",
- "//skia",
- "//testing/gtest",
- "//ui/gfx:test_support",
- ]
}
diff --git a/ui/gfx/BUILD.gn b/ui/gfx/BUILD.gn
index c23fb16..08a8dd3 100644
--- a/ui/gfx/BUILD.gn
+++ b/ui/gfx/BUILD.gn
@@ -371,10 +371,12 @@ source_set("test_support") {
]
deps = [
+ ":gfx",
"//base",
"//base/test:test_support",
"//skia",
"//testing/gtest",
+ "//ui/gfx/geometry",
]
if (is_ios) {
diff --git a/ui/wm/BUILD.gn b/ui/wm/BUILD.gn
index def5803..30b1c2e 100644
--- a/ui/wm/BUILD.gn
+++ b/ui/wm/BUILD.gn
@@ -79,6 +79,7 @@ component("wm") {
"//ui/base",
"//ui/compositor",
"//ui/events",
+ "//ui/events/platform",
"//ui/events:events_base",
"//ui/events/platform",
"//ui/gfx",