Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(425)

Unified Diff: headless/BUILD.gn

Issue 2837093003: Revert of Add --headless flag to Windows (Closed)
Patch Set: Fix compilation issue Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/app/chrome_main.cc ('k') | headless/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: headless/BUILD.gn
diff --git a/headless/BUILD.gn b/headless/BUILD.gn
index b3407de0a28b8e821fecb1c44849b6f19aec7615..39226340117bcd0f5620ce950860103db9fb4849 100644
--- a/headless/BUILD.gn
+++ b/headless/BUILD.gn
@@ -19,9 +19,9 @@ config("headless_implementation") {
}
}
-group("headless_lib") {
+group("headless") {
deps = [
- "//headless:headless",
+ "//headless:headless_lib",
]
}
@@ -201,7 +201,7 @@ action("gen_devtools_client_api") {
]
}
-component("headless") {
+static_library("headless_lib") {
sources = generated_devtools_api + [
"app/headless_shell_switches.cc",
"app/headless_shell_switches.h",
@@ -243,6 +243,10 @@ component("headless") {
"lib/headless_crash_reporter_client.h",
"lib/headless_content_client.cc",
"lib/headless_content_client.h",
+ "lib/headless_content_main_delegate.cc",
+ "lib/headless_content_main_delegate.h",
+ "lib/renderer/headless_content_renderer_client.cc",
+ "lib/renderer/headless_content_renderer_client.h",
"public/headless_browser.cc",
"public/headless_browser.h",
"public/headless_browser_context.h",
@@ -323,6 +327,9 @@ component("headless") {
"//components/crash/content/browser",
"//components/security_state/content",
"//components/security_state/core",
+ "//content/public/app:both",
+ "//content/public/browser",
+ "//content/public/child:child",
"//content/public/common",
"//content/public/common:service_names",
"//services/service_manager/public/cpp",
@@ -334,28 +341,19 @@ component("headless") {
"//url",
]
- if (is_component_build) {
- sources += [
- "lib/headless_content_main_delegate.cc",
- "lib/headless_content_main_delegate.h",
- "lib/renderer/headless_content_renderer_client.cc",
- "lib/renderer/headless_content_renderer_client.h",
- ]
-
- if (enable_basic_printing) {
- deps += [
- "//components/printing/browser",
- "//components/printing/renderer",
- ]
- }
- }
-
if (is_mac) {
deps += [ ":mac_helpers" ]
} else {
deps += [ "//ui/aura" ]
}
+ if (enable_basic_printing) {
+ deps += [
+ "//components/printing/browser",
+ "//components/printing/renderer",
+ ]
+ }
+
if (headless_use_embedded_resources) {
deps += [ ":embed_resources" ]
sources += [
@@ -369,32 +367,8 @@ component("headless") {
if (use_ozone) {
deps += [ "//ui/ozone" ]
}
- configs += [ ":headless_implementation" ]
-}
-# Headless renderer is a convenience source set that includes headless classes
-# that depend on the reenderer. These are not added in case of a component build
-# since in that case they are already included in the headless component.
-source_set("headless_renderer") {
- deps = [
- ":headless",
- ]
- if (!is_component_build) {
- sources = [
- "lib/headless_content_main_delegate.cc",
- "lib/headless_content_main_delegate.h",
- "lib/renderer/headless_content_renderer_client.cc",
- "lib/renderer/headless_content_renderer_client.h",
- ]
- deps += [ "//ui/base" ]
- if (enable_basic_printing) {
- deps += [
- "//components/printing/browser",
- "//components/printing/renderer",
- ]
- }
- configs += [ ":headless_implementation" ]
- }
+ configs += [ ":headless_implementation" ]
}
group("headless_tests") {
@@ -419,7 +393,7 @@ test("headless_unittests") {
]
deps = [
- ":headless",
+ ":headless_lib",
"//base/test:run_all_unittests",
"//base/test:test_support",
"//testing/gmock",
@@ -513,56 +487,15 @@ test("headless_browsertests") {
deps = [
":embedder_mojo_for_testing",
":headless_browser_tests_pak",
- ":headless_renderer",
"//base",
"//content/test:test_support",
+ "//headless:headless_lib",
"//testing/gmock",
"//testing/gtest",
]
}
-# Headless library with only browser dependencies. This is used when no child
-# dependencies are needed in the target (e.g. chrome:main_dll).
-static_library("headless_shell_browser_lib") {
- if (is_multi_dll_chrome) {
- defines = [ "CHROME_MULTIPLE_DLL_BROWSER" ]
- }
-
- sources = [
- "app/headless_shell.cc",
- "app/headless_shell.h",
- "app/headless_shell_switches.cc",
- "app/headless_shell_switches.h",
- "app/shell_navigation_request.cc",
- "app/shell_navigation_request.h",
- "lib/headless_content_main_delegate.cc",
- "lib/headless_content_main_delegate.h",
- "public/headless_shell.h",
- ]
-
- deps = [
- ":headless",
- "//content/public/browser",
- "//content/public/common",
- ]
-
- if (is_win) {
- deps += [
- "//content:sandbox_helper_win",
- "//sandbox",
- ]
- }
-
- configs += [ ":headless_implementation" ]
-}
-
-# Headless library with child specific dependencies (e.g., renderer). This
-# is used when no browser depencendies are needed (e.g. chrome:child_dll).
-static_library("headless_shell_child_lib") {
- if (is_multi_dll_chrome) {
- defines = [ "CHROME_MULTIPLE_DLL_CHILD" ]
- }
-
+static_library("headless_shell_lib") {
sources = [
"app/headless_shell.cc",
"app/headless_shell.h",
@@ -570,58 +503,34 @@ static_library("headless_shell_child_lib") {
"app/headless_shell_switches.h",
"app/shell_navigation_request.cc",
"app/shell_navigation_request.h",
- "lib/headless_content_main_delegate.cc",
- "lib/headless_content_main_delegate.h",
"public/headless_shell.h",
]
deps = [
- ":headless_renderer",
- "//content/public/child:child",
- "//net",
- "//ui/base",
+ "//headless:headless_lib",
]
configs += [ ":headless_implementation" ]
}
-# Headless library with all included dependencies. Use this library unless you
-# have browser/child dependencies restrictions.
-static_library("headless_shell_lib") {
+executable("headless_shell") {
sources = [
- "app/headless_shell.cc",
- "app/headless_shell.h",
- "app/headless_shell_switches.cc",
- "app/headless_shell_switches.h",
- "app/shell_navigation_request.cc",
- "app/shell_navigation_request.h",
- "public/headless_shell.h",
+ "app/headless_shell_main.cc",
]
deps = [
- ":headless_renderer",
- "//content/public/app:both",
- "//content/public/browser",
- "//content/public/child:child",
- "//content/public/common",
+ "//headless:headless_shell_lib",
]
if (is_win) {
deps += [
+ "//build/win:default_exe_manifest",
"//content:sandbox_helper_win",
"//sandbox",
]
}
-}
-executable("headless_shell") {
- sources = [
- "app/headless_shell_main.cc",
- ]
-
- deps = [
- ":headless_shell_lib",
- ]
+ configs += [ ":headless_implementation" ]
}
process_version("version_header") {
@@ -639,6 +548,6 @@ executable("headless_example") {
]
deps = [
- ":headless_shell_lib",
+ "//headless:headless_shell_lib",
]
}
« no previous file with comments | « chrome/app/chrome_main.cc ('k') | headless/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698