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

Side by Side Diff: headless/BUILD.gn

Issue 2835603002: Revert of Add --headless flag to Windows (Closed)
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « chrome/app/chrome_main.cc ('k') | headless/DEPS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/config/chrome_build.gni") 5 import("//build/config/chrome_build.gni")
6 import("//headless/headless.gni") 6 import("//headless/headless.gni")
7 import("//build/util/process_version.gni") 7 import("//build/util/process_version.gni")
8 import("//mojo/public/tools/bindings/mojom.gni") 8 import("//mojo/public/tools/bindings/mojom.gni")
9 import("//printing/features/features.gni") 9 import("//printing/features/features.gni")
10 import("//testing/test.gni") 10 import("//testing/test.gni")
11 import("//tools/grit/grit_rule.gni") 11 import("//tools/grit/grit_rule.gni")
12 import("//tools/grit/repack.gni") 12 import("//tools/grit/repack.gni")
13 13
14 config("headless_implementation") { 14 config("headless_implementation") {
15 defines = [ "HEADLESS_IMPLEMENTATION" ] 15 defines = [ "HEADLESS_IMPLEMENTATION" ]
16 16
17 if (headless_use_embedded_resources) { 17 if (headless_use_embedded_resources) {
18 defines += [ "HEADLESS_USE_EMBEDDED_RESOURCES" ] 18 defines += [ "HEADLESS_USE_EMBEDDED_RESOURCES" ]
19 } 19 }
20 } 20 }
21 21
22 group("headless_lib") { 22 group("headless") {
23 deps = [ 23 deps = [
24 "//headless:headless", 24 "//headless:headless_lib",
25 ] 25 ]
26 } 26 }
27 27
28 repack("pak") { 28 repack("pak") {
29 sources = [ 29 sources = [
30 "$root_gen_dir/blink/public/resources/blink_image_resources_100_percent.pak" , 30 "$root_gen_dir/blink/public/resources/blink_image_resources_100_percent.pak" ,
31 "$root_gen_dir/blink/public/resources/blink_resources.pak", 31 "$root_gen_dir/blink/public/resources/blink_resources.pak",
32 "$root_gen_dir/components/strings/components_strings_en-US.pak", 32 "$root_gen_dir/components/strings/components_strings_en-US.pak",
33 "$root_gen_dir/content/app/resources/content_resources_100_percent.pak", 33 "$root_gen_dir/content/app/resources/content_resources_100_percent.pak",
34 "$root_gen_dir/content/app/strings/content_strings_en-US.pak", 34 "$root_gen_dir/content/app/strings/content_strings_en-US.pak",
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 ] 195 ]
196 196
197 args = [ 197 args = [
198 "--protocol", 198 "--protocol",
199 rebase_path(inputs[0], root_build_dir), 199 rebase_path(inputs[0], root_build_dir),
200 "--output_dir", 200 "--output_dir",
201 rebase_path(target_gen_dir) + "/public", 201 rebase_path(target_gen_dir) + "/public",
202 ] 202 ]
203 } 203 }
204 204
205 component("headless") { 205 static_library("headless_lib") {
206 sources = generated_devtools_api + [ 206 sources = generated_devtools_api + [
207 "app/headless_shell_switches.cc", 207 "app/headless_shell_switches.cc",
208 "app/headless_shell_switches.h", 208 "app/headless_shell_switches.h",
209 "lib/browser/headless_browser_context_impl.cc", 209 "lib/browser/headless_browser_context_impl.cc",
210 "lib/browser/headless_browser_context_impl.h", 210 "lib/browser/headless_browser_context_impl.h",
211 "lib/browser/headless_browser_context_options.cc", 211 "lib/browser/headless_browser_context_options.cc",
212 "lib/browser/headless_browser_context_options.h", 212 "lib/browser/headless_browser_context_options.h",
213 "lib/browser/headless_browser_impl.cc", 213 "lib/browser/headless_browser_impl.cc",
214 "lib/browser/headless_browser_impl.h", 214 "lib/browser/headless_browser_impl.h",
215 "lib/browser/headless_browser_impl_mac.mm", 215 "lib/browser/headless_browser_impl_mac.mm",
(...skipping 21 matching lines...) Expand all
237 "lib/browser/headless_tab_socket_impl.h", 237 "lib/browser/headless_tab_socket_impl.h",
238 "lib/browser/headless_url_request_context_getter.cc", 238 "lib/browser/headless_url_request_context_getter.cc",
239 "lib/browser/headless_url_request_context_getter.h", 239 "lib/browser/headless_url_request_context_getter.h",
240 "lib/browser/headless_web_contents_impl.cc", 240 "lib/browser/headless_web_contents_impl.cc",
241 "lib/browser/headless_web_contents_impl.h", 241 "lib/browser/headless_web_contents_impl.h",
242 "lib/browser/headless_window_tree_host.h", 242 "lib/browser/headless_window_tree_host.h",
243 "lib/headless_crash_reporter_client.cc", 243 "lib/headless_crash_reporter_client.cc",
244 "lib/headless_crash_reporter_client.h", 244 "lib/headless_crash_reporter_client.h",
245 "lib/headless_content_client.cc", 245 "lib/headless_content_client.cc",
246 "lib/headless_content_client.h", 246 "lib/headless_content_client.h",
247 "lib/headless_content_main_delegate.cc",
248 "lib/headless_content_main_delegate.h",
249 "lib/renderer/headless_content_renderer_client.cc",
250 "lib/renderer/headless_content_renderer_client.h",
247 "public/headless_browser.cc", 251 "public/headless_browser.cc",
248 "public/headless_browser.h", 252 "public/headless_browser.h",
249 "public/headless_browser_context.h", 253 "public/headless_browser_context.h",
250 "public/headless_devtools_client.h", 254 "public/headless_devtools_client.h",
251 "public/headless_devtools_host.h", 255 "public/headless_devtools_host.h",
252 "public/headless_devtools_target.h", 256 "public/headless_devtools_target.h",
253 "public/headless_export.h", 257 "public/headless_export.h",
254 "public/headless_web_contents.h", 258 "public/headless_web_contents.h",
255 "public/internal/message_dispatcher.h", 259 "public/internal/message_dispatcher.h",
256 "public/internal/value_conversions.h", 260 "public/internal/value_conversions.h",
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 "//net", 321 "//net",
318 ] 322 ]
319 323
320 deps = [ 324 deps = [
321 ":gen_devtools_client_api", 325 ":gen_devtools_client_api",
322 ":tab_socket", 326 ":tab_socket",
323 ":version_header", 327 ":version_header",
324 "//components/crash/content/browser", 328 "//components/crash/content/browser",
325 "//components/security_state/content", 329 "//components/security_state/content",
326 "//components/security_state/core", 330 "//components/security_state/core",
331 "//content/public/app:both",
332 "//content/public/browser",
333 "//content/public/child:child",
327 "//content/public/common", 334 "//content/public/common",
328 "//content/public/common:service_names", 335 "//content/public/common:service_names",
329 "//services/service_manager/public/cpp", 336 "//services/service_manager/public/cpp",
330 "//third_party/mesa:osmesa", 337 "//third_party/mesa:osmesa",
331 "//ui/base", 338 "//ui/base",
332 "//ui/compositor", 339 "//ui/compositor",
333 "//ui/display", 340 "//ui/display",
334 "//ui/events/devices", 341 "//ui/events/devices",
335 "//url", 342 "//url",
336 ] 343 ]
337 344
338 if (is_component_build) {
339 sources += [
340 "lib/headless_content_main_delegate.cc",
341 "lib/headless_content_main_delegate.h",
342 "lib/renderer/headless_content_renderer_client.cc",
343 "lib/renderer/headless_content_renderer_client.h",
344 ]
345
346 if (enable_basic_printing) {
347 deps += [
348 "//components/printing/browser",
349 "//components/printing/renderer",
350 ]
351 }
352 }
353
354 if (!is_mac) { 345 if (!is_mac) {
355 deps += [ "//ui/aura" ] 346 deps += [ "//ui/aura" ]
356 } 347 }
357 348
349 if (enable_basic_printing) {
350 deps += [
351 "//components/printing/browser",
352 "//components/printing/renderer",
353 ]
354 }
355
358 if (headless_use_embedded_resources) { 356 if (headless_use_embedded_resources) {
359 deps += [ ":embed_resources" ] 357 deps += [ ":embed_resources" ]
360 sources += [ 358 sources += [
361 "$root_gen_dir/headless/embedded_resource_pak.cc", 359 "$root_gen_dir/headless/embedded_resource_pak.cc",
362 "$root_gen_dir/headless/embedded_resource_pak.h", 360 "$root_gen_dir/headless/embedded_resource_pak.h",
363 ] 361 ]
364 } else { 362 } else {
365 deps += [ ":pak" ] 363 deps += [ ":pak" ]
366 } 364 }
367 365
368 if (use_ozone) { 366 if (use_ozone) {
369 deps += [ "//ui/ozone" ] 367 deps += [ "//ui/ozone" ]
370 } 368 }
369
371 configs += [ ":headless_implementation" ] 370 configs += [ ":headless_implementation" ]
372 } 371 }
373 372
374 # Headless renderer is a convenience source set that includes headless classes
375 # that depend on the reenderer. These are not added in case of a component build
376 # since in that case they are already included in the headless component.
377 source_set("headless_renderer") {
378 deps = [
379 ":headless",
380 ]
381 if (!is_component_build) {
382 sources = [
383 "lib/headless_content_main_delegate.cc",
384 "lib/headless_content_main_delegate.h",
385 "lib/renderer/headless_content_renderer_client.cc",
386 "lib/renderer/headless_content_renderer_client.h",
387 ]
388 deps += [ "//ui/base" ]
389 if (enable_basic_printing) {
390 deps += [
391 "//components/printing/browser",
392 "//components/printing/renderer",
393 ]
394 }
395 configs += [ ":headless_implementation" ]
396 }
397 }
398
399 group("headless_tests") { 373 group("headless_tests") {
400 testonly = true 374 testonly = true
401 375
402 deps = [ 376 deps = [
403 ":headless_browsertests", 377 ":headless_browsertests",
404 ":headless_example", 378 ":headless_example",
405 ":headless_unittests", 379 ":headless_unittests",
406 ] 380 ]
407 } 381 }
408 382
409 test("headless_unittests") { 383 test("headless_unittests") {
410 sources = [ 384 sources = [
411 "public/domains/types_unittest.cc", 385 "public/domains/types_unittest.cc",
412 "public/util/deterministic_dispatcher_test.cc", 386 "public/util/deterministic_dispatcher_test.cc",
413 "public/util/error_reporter_unittest.cc", 387 "public/util/error_reporter_unittest.cc",
414 "public/util/expedited_dispatcher_test.cc", 388 "public/util/expedited_dispatcher_test.cc",
415 "public/util/generic_url_request_job_test.cc", 389 "public/util/generic_url_request_job_test.cc",
416 "public/util/testing/fake_managed_dispatch_url_request_job.cc", 390 "public/util/testing/fake_managed_dispatch_url_request_job.cc",
417 "public/util/testing/fake_managed_dispatch_url_request_job.h", 391 "public/util/testing/fake_managed_dispatch_url_request_job.h",
418 ] 392 ]
419 393
420 deps = [ 394 deps = [
421 ":headless", 395 ":headless_lib",
422 "//base/test:run_all_unittests", 396 "//base/test:run_all_unittests",
423 "//base/test:test_support", 397 "//base/test:test_support",
424 "//testing/gmock", 398 "//testing/gmock",
425 "//testing/gtest", 399 "//testing/gtest",
426 ] 400 ]
427 } 401 }
428 402
429 mojom("embedder_mojo_for_testing") { 403 mojom("embedder_mojo_for_testing") {
430 sources = [ 404 sources = [
431 "lib/embedder_test.mojom", 405 "lib/embedder_test.mojom",
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 "//third_party/skia/", 459 "//third_party/skia/",
486 "//third_party/tlslite/", 460 "//third_party/tlslite/",
487 "test/data/", 461 "test/data/",
488 ] 462 ]
489 463
490 defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ] 464 defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
491 465
492 deps = [ 466 deps = [
493 ":embedder_mojo_for_testing", 467 ":embedder_mojo_for_testing",
494 ":headless_browser_tests_pak", 468 ":headless_browser_tests_pak",
495 ":headless_renderer",
496 "//base", 469 "//base",
497 "//content/test:test_support", 470 "//content/test:test_support",
471 "//headless:headless_lib",
498 "//testing/gmock", 472 "//testing/gmock",
499 "//testing/gtest", 473 "//testing/gtest",
500 ] 474 ]
501 } 475 }
502 476
503 # Headless library with only browser dependencies. This is used when no child
504 # dependencies are needed in the target (e.g. chrome:main_dll).
505 static_library("headless_shell_browser_lib") {
506 if (is_multi_dll_chrome) {
507 defines = [ "CHROME_MULTIPLE_DLL_BROWSER" ]
508 }
509
510 sources = [
511 "app/headless_shell.cc",
512 "app/headless_shell.h",
513 "app/headless_shell_switches.cc",
514 "app/headless_shell_switches.h",
515 "app/shell_navigation_request.cc",
516 "app/shell_navigation_request.h",
517 "lib/headless_content_main_delegate.cc",
518 "lib/headless_content_main_delegate.h",
519 "public/headless_shell.h",
520 ]
521
522 deps = [
523 ":headless",
524 "//content/public/browser",
525 "//content/public/common",
526 ]
527
528 if (is_win) {
529 deps += [
530 "//content:sandbox_helper_win",
531 "//sandbox",
532 ]
533 }
534
535 configs += [ ":headless_implementation" ]
536 }
537
538 # Headless library with child specific dependencies (e.g., renderer). This
539 # is used when no browser depencendies are needed (e.g. chrome:child_dll).
540 static_library("headless_shell_child_lib") {
541 if (is_multi_dll_chrome) {
542 defines = [ "CHROME_MULTIPLE_DLL_CHILD" ]
543 }
544
545 sources = [
546 "app/headless_shell.cc",
547 "app/headless_shell.h",
548 "app/headless_shell_switches.cc",
549 "app/headless_shell_switches.h",
550 "app/shell_navigation_request.cc",
551 "app/shell_navigation_request.h",
552 "lib/headless_content_main_delegate.cc",
553 "lib/headless_content_main_delegate.h",
554 "public/headless_shell.h",
555 ]
556
557 deps = [
558 ":headless_renderer",
559 "//content/public/child:child",
560 "//ui/base",
561 ]
562
563 configs += [ ":headless_implementation" ]
564 }
565
566 # Headless library with all included dependencies. Use this library unless you
567 # have browser/child dependencies restrictions.
568 static_library("headless_shell_lib") { 477 static_library("headless_shell_lib") {
569 sources = [ 478 sources = [
570 "app/headless_shell.cc", 479 "app/headless_shell.cc",
571 "app/headless_shell.h", 480 "app/headless_shell.h",
572 "app/headless_shell_switches.cc", 481 "app/headless_shell_switches.cc",
573 "app/headless_shell_switches.h", 482 "app/headless_shell_switches.h",
574 "app/shell_navigation_request.cc", 483 "app/shell_navigation_request.cc",
575 "app/shell_navigation_request.h", 484 "app/shell_navigation_request.h",
576 "public/headless_shell.h", 485 "public/headless_shell.h",
577 ] 486 ]
578 487
579 deps = [ 488 deps = [
580 ":headless_renderer", 489 "//headless:headless_lib",
581 "//content/public/app:both",
582 "//content/public/browser",
583 "//content/public/child:child",
584 "//content/public/common",
585 ] 490 ]
586 491
587 if (is_win) { 492 configs += [ ":headless_implementation" ]
588 deps += [
589 "//content:sandbox_helper_win",
590 "//sandbox",
591 ]
592 }
593 } 493 }
594 494
595 executable("headless_shell") { 495 executable("headless_shell") {
596 sources = [ 496 sources = [
597 "app/headless_shell_main.cc", 497 "app/headless_shell_main.cc",
598 ] 498 ]
599 499
600 deps = [ 500 deps = [
601 ":headless_shell_lib", 501 "//headless:headless_shell_lib",
602 ] 502 ]
503
504 if (is_win) {
505 deps += [
506 "//build/win:default_exe_manifest",
507 "//content:sandbox_helper_win",
508 "//sandbox",
509 ]
510 }
511
512 configs += [ ":headless_implementation" ]
603 } 513 }
604 514
605 process_version("version_header") { 515 process_version("version_header") {
606 template_file = "public/version.h.in" 516 template_file = "public/version.h.in"
607 sources = [ 517 sources = [
608 "//build/util/LASTCHANGE", 518 "//build/util/LASTCHANGE",
609 "//chrome/VERSION", 519 "//chrome/VERSION",
610 ] 520 ]
611 output = "$target_gen_dir/public/version.h" 521 output = "$target_gen_dir/public/version.h"
612 } 522 }
613 523
614 executable("headless_example") { 524 executable("headless_example") {
615 sources = [ 525 sources = [
616 "app/headless_example.cc", 526 "app/headless_example.cc",
617 ] 527 ]
618 528
619 deps = [ 529 deps = [
620 ":headless_shell_lib", 530 "//headless:headless_shell_lib",
621 ] 531 ]
622 } 532 }
OLDNEW
« 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