1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50
   51
   52
   53
   54
   55
   56
   57
   58
   59
   60
   61
   62
   63
   64
   65
   66
   67
   68
   69
   70
   71
   72
   73
   74
   75
   76
   77
   78
   79
   80
   81
   82
   83
   84
   85
   86
   87
   88
   89
   90
   91
   92
   93
   94
   95
   96
   97
   98
   99

content / public / app / BUILD.gn [blame]

# Copyright 2014 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# App different than the regular content subcomponents (see comments in
# //content/BUILD.gn) because it has to support the browser/child process split
# (the "both" target include both browser and child process files and is used
# for testing).
#
# In non-component mode, browser, child, and both all follow the same structure:
# foo ->
#   //content/public/app:child (group) ->
#     //content/public/app:child_sources (source set) ->
#       //content/app:child (source set)

# In component mode, content is linked as one big turd so there is only one
# app target containing sources ("both") and the other ones forward to it:
# foo ->
#   //content/public/app:child (group; "browser" and "both" ones look the same)
#     //content (shared library) ->
#       //content/public/app:app_sources (source set)

import("//build/config/chrome_build.gni")
import("//build/config/ui.gni")
import("//chromeos/ash/components/assistant/assistant.gni")
import("//tools/v8_context_snapshot/v8_context_snapshot.gni")
import("//ui/base/ui_features.gni")

public_app_shared_sources = [
  "content_jni_onload.h",
  "content_main.h",
  "content_main_delegate.cc",
  "content_main_delegate.h",
  "content_main_runner.h",
  "initialize_mojo_core.h",
]

public_app_shared_public_deps = [
  "//base",
  "//content:export",
  "//third_party/abseil-cpp:absl",
]

public_app_shared_deps = [
  "//base:i18n",
  "//content/app",
  "//content/public/common:common_sources",
  "//content/public/gpu:gpu_sources",
  "//content/public/renderer:renderer_sources",
  "//content/public/utility:utility_sources",
]

if (is_win) {
  public_app_shared_sources += [ "sandbox_helper_win.h" ]
  public_app_shared_deps += [ "//sandbox/win:common" ]
}

if (is_component_build) {
  source_set("app_sources") {
    # Only the main content shared library can pull this in.
    visibility = [ "//content:content" ]

    sources = public_app_shared_sources

    configs += [ "//content:content_implementation" ]

    public_deps = public_app_shared_public_deps

    deps =
        public_app_shared_deps + [ "//content/public/browser:browser_sources" ]

    allow_circular_includes_from = [
      # This target is a pair with the non-public version. They always go
      # together and include headers from each other.
      "//content/app",
    ]
  }

  # This just forwards to content, which in turn depends on "app_sources".
  group("app") {
    public_deps = [ "//content" ]
  }
} else {
  source_set("app") {
    sources = public_app_shared_sources
    configs += [ "//content:content_implementation" ]
    public_deps = public_app_shared_public_deps
    deps = public_app_shared_deps + [
             "//content/public/browser",
             "//content/public/common",
           ]

    allow_circular_includes_from = [
      # This target is a pair with the non-public version. They always go
      # together and include headers from each other.
      "//content/app",
    ]
  }
}