Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / content / app / BUILD.gn
index f636d9f..61813d5 100644 (file)
@@ -25,7 +25,7 @@ content_app_deps = [
   # picking the allocator.
   "//base/allocator",
   "//content:export",
-  "//content/public/common",
+  "//content/public/common:common_sources",
   "//crypto",
   "//ui/base",
   "//ui/gfx",
@@ -37,7 +37,7 @@ if (is_win) {
 } else if (is_android) {
   content_app_sources -= [ "content_main.cc" ]
   content_app_deps += [
-    "//content:content_jni_headers",
+    "//content/public/android:jni",
     "//skia",
     "//third_party/android_tools:cpu_features"
   ]
@@ -63,55 +63,41 @@ content_app_extra_configs = [
   "//content:content_implementation",
 ]
 
-if (is_component_build) {
-  source_set("app") {
-    sources = content_app_sources
-    configs += content_app_extra_configs
-    deps = content_app_deps
-  }
+# This includes the app sources for both the browser and child processes.
+source_set("both") {
+  # Only the public target should depend on this. All other targets (even
+  # internal content ones) should depend on the public one.
+  visibility = [ "//content/public/app:*" ]
 
-  # In the component build, all of these app targets redirect to the content
-  # component. The content component in turn references the "app" target above.
-  group("browser") {
-    deps = [ "//content" ]
-  }
-  group("child") {
-    deps = [ "//content" ]
-  }
-  group("both") {
-    deps = [ "//content" ]
-  }
-} else {
-  # Non-component build. In this case, we have different versions of
-  # "content/app" for the browser and child process.
+  sources = content_app_sources
+  configs += content_app_extra_configs
+  deps = content_app_deps
+}
 
-  # TODO(GYP) enable chrome_multiple_dll support
-  is_chrome_multiple_dll = false
+# TODO(GYP) enable chrome_multiple_dll support
+is_chrome_multiple_dll = false
+
+if (is_chrome_multiple_dll) {
+  # It doesn't make sense to do the browser/child dll split in component mode.
+  assert(!is_component_build)
 
   source_set("browser") {
+    visibility = [ "//content/public/app:browser" ]
+
     sources = content_app_sources
     configs += content_app_extra_configs
     deps = content_app_deps
 
-    if (is_chrome_multiple_dll) {
-      defines += [ "CHROME_MULTIPLE_DLL_BROWSER" ]
-    }
+    defines += [ "CHROME_MULTIPLE_DLL_BROWSER" ]
   }
 
   source_set("child") {
-    sources = content_app_sources
-    configs += content_app_extra_configs
-    deps = content_app_deps
-
-    if (is_chrome_multiple_dll) {
-      defines += [ "CHROME_MULTIPLE_DLL_CHILD" ]
-    }
-  }
+    visibility = [ "//content/public/app:child" ]
 
-  # Includes both browser and child process app sources.
-  source_set("both") {
     sources = content_app_sources
     configs += content_app_extra_configs
     deps = content_app_deps
+
+    defines += [ "CHROME_MULTIPLE_DLL_CHILD" ]
   }
 }