Skip to content

Commit

Permalink
Make more of content pass "gn check"
Browse files Browse the repository at this point in the history
Adds dependencies and makes some deps public so more of content passes include checking. This adds 25 targets.

CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

Review URL: https://codereview.chromium.org/1817903002

Cr-Commit-Position: refs/heads/master@{#382430}
  • Loading branch information
brettw authored and Commit bot committed Mar 21, 2016
1 parent 9f060d4 commit c15ed73
Show file tree
Hide file tree
Showing 16 changed files with 85 additions and 21 deletions.
3 changes: 1 addition & 2 deletions .gn
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ check_targets = [
"//components/*",

#"//content/*", # A whole lot of errors.
"//content/public/common:result_codes",
"//content/public/common:static_switches",
"//content/public/*",
"//content/renderer/*",
"//courgette/*",
"//crypto/*",
Expand Down
4 changes: 3 additions & 1 deletion cc/surfaces/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@ component("surfaces") {

defines = [ "CC_SURFACES_IMPLEMENTATION=1" ]

deps = [
public_deps = [
":surface_id",
]
deps = [
"//base",
"//base/third_party/dynamic_annotations",
"//cc",
Expand Down
13 changes: 13 additions & 0 deletions content/browser/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,16 @@ source_set("browser") {
deps = [
"//base",
"//base:base_static",
"//base/third_party/dynamic_annotations",
"//cc",
"//cc/surfaces",
"//components/filesystem:lib",
"//components/leveldb:lib",
"//components/mime_util",
"//components/profile_service:lib",
"//components/scheduler:common",
"//components/tracing",
"//components/tracing:startup_tracing",
"//components/url_formatter",
"//content:resources",
"//content/app/resources",
Expand All @@ -55,9 +58,15 @@ source_set("browser") {
"//device/vibration",
"//gin",
"//google_apis",
"//gpu",
"//gpu/command_buffer/client:gles2_implementation",
"//ipc/mojo",
"//media",
"//media/midi",
"//mojo/common",
"//mojo/common:url_type_converters",
"//mojo/converters/geometry",
"//mojo/converters/network",
"//mojo/public/cpp/bindings",
"//mojo/public/js",
"//mojo/shell",
Expand Down Expand Up @@ -87,6 +96,9 @@ source_set("browser") {
"//third_party/libyuv",
"//third_party/npapi",
"//third_party/re2",
"//third_party/webrtc",
"//third_party/webrtc/base:rtc_base",
"//third_party/webrtc/modules/desktop_capture:primitives",
"//third_party/zlib",
"//third_party/zlib:zip",
"//ui/accessibility",
Expand All @@ -101,6 +113,7 @@ source_set("browser") {
"//ui/gl",
"//ui/native_theme",
"//ui/resources",
"//ui/shell_dialogs",
"//ui/snapshot",
"//ui/surface",
"//ui/touch_selection",
Expand Down
1 change: 1 addition & 0 deletions content/common/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ source_set("common") {
"//third_party/boringssl",
"//third_party/icu",
"//third_party/libjingle",
"//third_party/webrtc/base:rtc_base",
"//ui/accessibility",
"//ui/base",
"//ui/base/ime",
Expand Down
4 changes: 4 additions & 0 deletions content/public/app/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ public_app_shared_deps = [
"//base:i18n",
"//content:export",
"//content/public/common:common_sources",
"//content/public/gpu:gpu_sources",
"//content/public/plugin:plugin_sources",
"//content/public/renderer:renderer_sources",
"//content/public/utility:utility_sources",
]

if (is_component_build) {
Expand Down
20 changes: 16 additions & 4 deletions content/public/browser/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ source_set("browser_sources") {
".",
"//content")

if (use_aura) {
sources -= [ "context_factory.h" ]
}

configs += [
"//build/config:precompiled_headers",
"//content:content_implementation",
Expand All @@ -43,17 +39,33 @@ source_set("browser_sources") {
"//skia",
]
deps = [
"//cc",
"//content/browser",
"//content/public/common:common_sources",
"//gpu",
"//media",
"//net",
"//ppapi/c",
"//storage/browser",
"//ui/accessibility",
"//ui/base",
"//ui/events",
"//ui/gl",
"//ui/surface",
]

allow_circular_includes_from = [
# This target is a pair with content/browser. They always go together and
# include headers from each other.
"//content/browser",
]

if (is_android) {
deps += [ "//ui/android" ]
}

if (use_aura) {
sources -= [ "context_factory.h" ]
deps += [ "//ui/aura" ]
}
}
4 changes: 2 additions & 2 deletions content/public/browser/desktop_media_id.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
#include "base/strings/string_util.h"

#if defined(USE_AURA)
#include "ui/aura/window.h"
#include "ui/aura/window_observer.h"
#include "ui/aura/window.h" // nogncheck
#include "ui/aura/window_observer.h" // nogncheck
#endif // defined(USE_AURA)

namespace {
Expand Down
1 change: 1 addition & 0 deletions content/public/child/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@ source_set("child_sources") {

deps = [
"//content/public/common:common_sources",
"//gin",
]
}
19 changes: 19 additions & 0 deletions content/public/common/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,13 @@ source_set("content_descriptors") {
sources = [
"content_descriptors.h",
]

# The header uses V8_USE_EXTERNAL_STARTUP_DATA.
public_configs = [ "//v8:external_startup_data" ]

deps = [
"//ipc",
]
}

# Forces static linking for targets using the static_switches constants, even
Expand Down Expand Up @@ -91,14 +97,26 @@ source_set("common_sources") {
"//url/ipc:url_ipc",
]
deps = [
"//ipc",
"//ipc/mojo",
"//media",
"//mojo/common",
"//net",
"//ppapi/c",
"//skia",
"//storage/common",
"//third_party/WebKit/public:blink_headers",
"//third_party/icu",
"//ui/accessibility",
"//ui/base",
"//ui/gfx",
"//ui/gfx/ipc",
"//ui/surface",
]

# //content/common needs to include public headers.
allow_circular_includes_from = [ "//content/common" ]

if (!enable_plugins) {
sources -= [
"pepper_plugin_info.cc",
Expand Down Expand Up @@ -132,6 +150,7 @@ buildflag_header("features") {
source_set("feature_h264_with_openh264_ffmpeg") {
deps = [
":features",
"//base",
]
sources = [
"feature_h264_with_openh264_ffmpeg.cc",
Expand Down
1 change: 1 addition & 0 deletions content/public/gpu/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@ source_set("gpu_sources") {
"//base",
"//content:export",
"//content/gpu:gpu_sources",
"//content/public/common:common_sources",
]
}
7 changes: 7 additions & 0 deletions content/public/renderer/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,19 @@ source_set("renderer_sources") {
configs += [ "//content:content_implementation" ]

deps = [
"//content/public/child:child_sources",
"//content/public/common:common_sources",
"//content/renderer",
"//gin",
"//media",
"//net",
"//ppapi/c",
"//skia",
"//third_party/WebKit/public:blink_headers",
"//third_party/libjingle",
"//third_party/widevine/cdm:version_h",
"//ui/base",
"//ui/base/ime",
"//ui/gfx",
"//v8",
]
Expand Down
1 change: 1 addition & 0 deletions content/public/utility/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ source_set("utility_sources") {
deps = [
"//base",
"//content:export",
"//content/public/child:child_sources",
"//content/public/common:common_sources",
"//content/utility",
"//ipc",
Expand Down
6 changes: 4 additions & 2 deletions gpu/command_buffer/client/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,12 @@ source_set("client_sources") {

all_dependent_configs = [ "//third_party/khronos:khronos_headers" ]

deps = [
public_deps = [
"//base",
"//gpu/command_buffer/common:common_sources",
"//gpu/command_buffer/common:gles2_utils",
]
deps = [
"//gpu/command_buffer/common:common_sources",
"//ui/gfx:memory_buffer",
"//ui/gfx/geometry",
]
Expand Down
4 changes: 3 additions & 1 deletion storage/browser/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -188,13 +188,15 @@ component("browser") {
"//build/config/compiler:wexit_time_destructors",
]

public_deps = [
"//storage/common",
]
deps = [
"//base",
"//base:i18n",
"//base/third_party/dynamic_annotations",
"//net",
"//sql",
"//storage/common",
"//third_party/leveldatabase",
"//third_party/sqlite",
"//url",
Expand Down
2 changes: 1 addition & 1 deletion ui/events/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ component("events_base") {
defines = [ "EVENTS_BASE_IMPLEMENTATION" ]

deps = [
":dom_keycode_converter",
"//base/third_party/dynamic_annotations",
"//skia",
]

public_deps = [
":dom_keycode_converter",
"//base",
"//ui/events/platform",
"//ui/gfx",
Expand Down
16 changes: 8 additions & 8 deletions ui/gfx/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,14 @@ component("gfx") {
# This is part of the gfx component in the component build.
defines = [ "GFX_IMPLEMENTATION" ]

public_deps = [
":memory_buffer_sources",
":native_widget_types",
"//base",
"//skia",
"//third_party/icu",
"//ui/gfx/geometry",
]
deps = [
":gfx_export",
"//base",
Expand All @@ -269,14 +277,6 @@ component("gfx") {
"//third_party/harfbuzz-ng",
"//third_party/libpng",
"//third_party/zlib",
"//ui/gfx/geometry",
]
public_deps = [
":memory_buffer_sources",
":native_widget_types",
"//base",
"//skia",
"//third_party/icu",
]

# Text rendering conditions (complicated so separated out).
Expand Down

0 comments on commit c15ed73

Please sign in to comment.