diff options
author | Brett Wilson <brettw@chromium.org> | 2014-09-09 16:37:29 -0700 |
---|---|---|
committer | Brett Wilson <brettw@chromium.org> | 2014-09-09 23:45:41 +0000 |
commit | e7487946ffbd0ab4d331d6ff664e4553629b643d (patch) | |
tree | 7e025ec7c444c98ba67f6a1078fbdae0162e8644 /content/public/app | |
parent | 098fc170c44d55377d0d79fafc98f095ed484b23 (diff) | |
download | chromium_src-e7487946ffbd0ab4d331d6ff664e4553629b643d.zip chromium_src-e7487946ffbd0ab4d331d6ff664e4553629b643d.tar.gz chromium_src-e7487946ffbd0ab4d331d6ff664e4553629b643d.tar.bz2 |
Work on "gn check" of content/*
This fixes most, but not all, errors identified by "gn check"
R=scottmg@chromium.org
Review URL: https://codereview.chromium.org/551103002
Cr-Commit-Position: refs/heads/master@{#294036}
Diffstat (limited to 'content/public/app')
-rw-r--r-- | content/public/app/BUILD.gn | 69 | ||||
-rw-r--r-- | content/public/app/content_main_delegate.cc | 2 |
2 files changed, 57 insertions, 14 deletions
diff --git a/content/public/app/BUILD.gn b/content/public/app/BUILD.gn index fa087e3..bcced87 100644 --- a/content/public/app/BUILD.gn +++ b/content/public/app/BUILD.gn @@ -3,12 +3,13 @@ # found in the LICENSE file. # Used internally to hold the sources shared between the various targets below. -source_set("app_sources") { +source_set("app_shared_sources") { + # content_main_delegate.cc has ifdefs that depend on whether the file is + # being used in the context of the browser or child process. So that file has + # to be included in the per-type targets below rather than in this shared one. sources = [ "android_library_loader_hooks.h", "content_main.h", - "content_main_delegate.cc", - "content_main_delegate.h", "content_main_runner.h", "startup_helper_win.h", ] @@ -19,6 +20,7 @@ source_set("app_sources") { "//base", "//base:i18n", "//content:export", + "//content/common", "//content/public/plugin", "//content/public/renderer", "//content/public/utility", @@ -28,10 +30,17 @@ source_set("app_sources") { # The structure of this is like the private content/app implementation. if (is_component_build) { - group("app") { + source_set("app") { + sources = [ + "content_main_delegate.cc", + "content_main_delegate.h", + ] + deps = [ - ":app_sources", + ":app_shared_sources", "//content/app", + "//content/common", + "//content/public/browser", ] } group("browser") { @@ -46,22 +55,54 @@ if (is_component_build) { } else { - group("browser") { + source_set("browser") { + # See comment in "child" target. + check_includes = false + sources = [ + "content_main_delegate.cc", + "content_main_delegate.h", + ] deps = [ - ":app_sources", - "//content/app:browser" + ":app_shared_sources", + "//content/app:browser", + "//content/public/browser", + "//content/public/common", ] } - group("child") { + source_set("child") { + # content_main_delegate.cc conditionally includes content_browser_client.h + # from //content/public/browser when it's not the child build. However, + # the header checker doesn't know this doesn't apply and throws an error. + # + # TODO(brettw) either teach the header checker to understand simple + # ifdefs or split the file apart so we can enable header checking here. + # Furthermore, since this file exists in more than one target, they all + # have to opt-out of header checking (a file is checked once for all + # targets using a source file). + check_includes = false + + sources = [ + "content_main_delegate.cc", + "content_main_delegate.h", + ] deps = [ - ":app_sources", - "//content/app:child" + ":app_shared_sources", + "//content/app:child", + "//content/public/common", ] } - group("both") { + source_set("both") { + # See comment in "child" target. + check_includes = false + sources = [ + "content_main_delegate.cc", + "content_main_delegate.h", + ] deps = [ - ":app_sources", - "//content/app:both" + ":app_shared_sources", + "//content/app:both", + "//content/public/browser", + "//content/public/common", ] } diff --git a/content/public/app/content_main_delegate.cc b/content/public/app/content_main_delegate.cc index 498bc86..e86f6c8 100644 --- a/content/public/app/content_main_delegate.cc +++ b/content/public/app/content_main_delegate.cc @@ -4,7 +4,9 @@ #include "content/public/app/content_main_delegate.h" +#if !defined(CHROME_MULTIPLE_DLL_CHILD) #include "content/public/browser/content_browser_client.h" +#endif #if !defined(OS_IOS) #include "content/public/plugin/content_plugin_client.h" |