diff options
author | James Robinson <jamesr@chromium.org> | 2014-09-10 15:31:37 -0700 |
---|---|---|
committer | James Robinson <jamesr@chromium.org> | 2014-09-10 22:45:03 +0000 |
commit | 060f2e31fd19dd8d5b029cd281aed05a510c545f (patch) | |
tree | 5d0a8edb2ed6f9619e7bb84432da8c45221a8800 | |
parent | a1cfce8ecf31c486bbb1307ebfb44a2a0c15d2cb (diff) | |
download | chromium_src-060f2e31fd19dd8d5b029cd281aed05a510c545f.zip chromium_src-060f2e31fd19dd8d5b029cd281aed05a510c545f.tar.gz chromium_src-060f2e31fd19dd8d5b029cd281aed05a510c545f.tar.bz2 |
GN: Enable blink and (nearly) all of content in android build
This enables all blink targets and nearly all content targets in the
android build. This produces a content shell APK, but not a fully
operational one yet. This also flips on a bunch of other targets pulled
in by deps.
R=brettw@chromium.org
Review URL: https://codereview.chromium.org/561623002
Cr-Commit-Position: refs/heads/master@{#294247}
-rw-r--r-- | BUILD.gn | 16 | ||||
-rw-r--r-- | breakpad/BUILD.gn | 8 | ||||
-rw-r--r-- | build/config/BUILD.gn | 4 | ||||
-rw-r--r-- | build/config/android/config.gni | 5 | ||||
-rw-r--r-- | build/config/features.gni | 2 | ||||
-rw-r--r-- | components/crash/app/BUILD.gn | 7 | ||||
-rw-r--r-- | content/app/BUILD.gn | 2 | ||||
-rw-r--r-- | content/browser/BUILD.gn | 7 | ||||
-rw-r--r-- | content/common/BUILD.gn | 9 | ||||
-rw-r--r-- | content/content_renderer.gypi | 2 | ||||
-rw-r--r-- | content/public/android/BUILD.gn | 21 | ||||
-rw-r--r-- | content/renderer/BUILD.gn | 1 | ||||
-rw-r--r-- | content/shell/BUILD.gn | 15 | ||||
-rw-r--r-- | content/test/BUILD.gn | 10 | ||||
-rw-r--r-- | sandbox/linux/BUILD.gn | 62 |
15 files changed, 109 insertions, 62 deletions
@@ -124,7 +124,6 @@ group("root") { "//ui/views", "//ui/views/controls/webview", "//ui/web_dialogs", - "//ui/wm", "//url", "//v8:v8", ] @@ -145,6 +144,10 @@ group("root") { deps += [ "//tools/xdisplaycheck" ] } + if (use_aura) { + deps += [ "//ui/wm" ] + } + if (is_win) { deps += [ "//ui/metro_viewer", @@ -178,7 +181,6 @@ group("root") { deps -= [ "//apps", # Needs testing. - "//cc/blink", # Blocked on blink "//chrome/browser", # Blocked on content. "//chrome/browser/devtools", # Blocked on content. "//chrome/browser/ui", # Blocked on content. @@ -188,23 +190,16 @@ group("root") { "//chrome/renderer", # Blocked on content. "//chrome/service", # Blocked on content. "//chrome/utility", # Blocked on content. - "//content", - "//content/shell:content_shell", # Blocked on content. - "//content/test:test_support", # Blocked on content. + "//content/shell:content_shell", "//extensions/browser", "//extensions/common", "//extensions/common/api", "//extensions/renderer", - "//media/blink", # Blocked on blink "//pdf", # Not compiled on Android in GYP yet, either. "//ppapi:ppapi_c", - "//sandbox", "//third_party/libusb", "//ui/keyboard", # Blocked on content. - # Blocked on neon stuff in vp8 - "//third_party/WebKit/public:all_blink", - # Seems to not be compiled on Android. Otherwise it will need a config.h. "//third_party/libxslt", @@ -229,7 +224,6 @@ group("root") { "//third_party/ffmpeg", "//ui/app_list", "//ui/web_dialogs", - "//ui/wm", ] } diff --git a/breakpad/BUILD.gn b/breakpad/BUILD.gn index 68eb059..bb2610a 100644 --- a/breakpad/BUILD.gn +++ b/breakpad/BUILD.gn @@ -309,7 +309,7 @@ if (is_mac) { } } -if (is_linux || is_android) { +if (is_linux) { executable("symupload") { sources = [ "src/tools/linux/symupload/sym_upload.cc", @@ -328,7 +328,7 @@ if (is_linux || is_android) { } } -if (is_linux) { +if (is_linux || is_android) { if (current_toolchain == host_toolchain) { # dump_syms is a host tool, so only compile it for the host system. executable("dump_syms") { @@ -487,7 +487,9 @@ if (is_linux) { configs -= [ "//build/config/compiler:chromium_code" ] configs += [ "//build/config/compiler:no_chromium_code" ] } +} +if (is_linux) { test("breakpad_unittests") { sources = [ "linux/breakpad_googletest_includes.h", @@ -545,7 +547,7 @@ if (is_linux) { if (is_android) { sources += [ "src/common/android/breakpad_getcontext_unittest.cc" ] libs = [ "log" ] - include_dirs = [ "src/common/android/include" ] + include_dirs += [ "src/common/android/include" ] } } diff --git a/build/config/BUILD.gn b/build/config/BUILD.gn index 41b3140..7138336 100644 --- a/build/config/BUILD.gn +++ b/build/config/BUILD.gn @@ -47,6 +47,10 @@ config("feature_flags") { # TODO(brettw) should probably be "=1" defines += [ "ENABLE_PEPPER_CDMS" ] } + if (enable_browser_cdms) { + # TODO(brettw) should probably be "=1" + defines += [ "ENABLE_BROWSER_CDMS" ] + } if (enable_plugins) { defines += [ "ENABLE_PLUGINS=1" ] } diff --git a/build/config/android/config.gni b/build/config/android/config.gni index 5c1be46..7603280 100644 --- a/build/config/android/config.gni +++ b/build/config/android/config.gni @@ -20,6 +20,11 @@ if (is_android) { android_default_keystore_path = "//build/android/ant/chromium-debug.keystore" android_default_keystore_name = "chromiumdebugkey" android_default_keystore_password = "chromium" + + # This is a unique identifier for a given build. It's used for + # identifying various build artifacts corresponding to a particular build of + # chrome (e.g. where to find archived symbols). + android_chrome_build_id = "\"\"" } if (is_android_webview_build) { diff --git a/build/config/features.gni b/build/config/features.gni index 28bffd4..54b6159 100644 --- a/build/config/features.gni +++ b/build/config/features.gni @@ -58,6 +58,8 @@ enable_spellcheck = !is_android enable_pepper_cdms = enable_plugins && (is_linux || is_mac || is_win) +enable_browser_cdms = is_android + # Enable printing support and UI. This variable is used to configure which # parts of printing will be built. 0 disables printing completely, 1 enables it # fully, and 2 enables only the codepath to generate a Metafile (e.g. usually diff --git a/components/crash/app/BUILD.gn b/components/crash/app/BUILD.gn index 5292c1a..6848a07 100644 --- a/components/crash/app/BUILD.gn +++ b/components/crash/app/BUILD.gn @@ -50,6 +50,10 @@ source_set("app") { ":lib", ] + if (is_android) { + defines += [ "CHROME_BUILD_ID=" + android_chrome_build_id ] + } + if (is_mac) { deps += [ "//breakpad" ] } else if (is_win) { @@ -58,8 +62,7 @@ source_set("app") { "//breakpad:breakpad_handler", #'../breakpad/breakpad.gyp:breakpad_sender', TODO(GYP) ] - } else if (is_posix && !is_ios && - (!is_android || !is_android_webview_build)) { + } else if (is_posix && !is_ios && (!is_android || !is_android_webview_build)) { deps += [ "//breakpad:client" ] } } diff --git a/content/app/BUILD.gn b/content/app/BUILD.gn index f636d9f..35df02b 100644 --- a/content/app/BUILD.gn +++ b/content/app/BUILD.gn @@ -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" ] diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn index da48444..e2f289949 100644 --- a/content/browser/BUILD.gn +++ b/content/browser/BUILD.gn @@ -49,7 +49,6 @@ source_set("browser") { "//ui/native_theme", "//ui/resources", "//ui/snapshot", - "//ui/wm", ] if (is_ios) { @@ -137,7 +136,7 @@ source_set("browser") { sources -= [ "renderer_host/web_input_event_aurawin.cc" ] } - if (!is_win && !is_mac && (!is_linux || !use_udev)) { + if (!is_win && !is_mac && !is_android && (!is_linux || !use_udev)) { sources += [ "gamepad/gamepad_platform_data_fetcher.cc" ] } @@ -261,6 +260,7 @@ source_set("browser") { } else { sources -= [ "power_save_blocker_x11.cc", + "renderer_host/web_input_event_aurax11.cc", ] } @@ -308,7 +308,7 @@ source_set("browser") { "speech/speech_recognizer_impl.h", ] deps += [ - #"//content:jni_headers", TODO(GYP) + "//content/public/android:jni", "//media", ] libs += [ "jnigraphics" ] @@ -342,6 +342,7 @@ source_set("browser") { deps += [ "//ui/aura", "//ui/strings", + "//ui/wm", ] } else { # Not aura. sources -= [ diff --git a/content/common/BUILD.gn b/content/common/BUILD.gn index 51766f1..d3e9124 100644 --- a/content/common/BUILD.gn +++ b/content/common/BUILD.gn @@ -106,11 +106,10 @@ source_set("common") { "gpu/client/gpu_memory_buffer_impl_surface_texture.h", ] - # TODO(GYP) enable when these targets are converted. - #deps += [ - # "//content:content_jni_headers", - # "//content:common_aidl", - #] + deps += [ + "//content/public/android:jni", + "//content/public/android:common_aidl", + ] libs += [ "android" ] } diff --git a/content/content_renderer.gypi b/content/content_renderer.gypi index 2b1b7a2..3a99724 100644 --- a/content/content_renderer.gypi +++ b/content/content_renderer.gypi @@ -724,9 +724,7 @@ 'sources!': [ 'renderer/accessibility/renderer_accessibility_focus_only.cc', 'renderer/media/audio_decoder.cc', - 'renderer/media/filter_helpers.cc', 'renderer/media/crypto/encrypted_media_player_support_impl.cc', - 'renderer/media/webmediaplayer_impl.cc', ], 'sources': [ 'renderer/external_popup_menu.cc', diff --git a/content/public/android/BUILD.gn b/content/public/android/BUILD.gn index 0755a18..ef9a861 100644 --- a/content/public/android/BUILD.gn +++ b/content/public/android/BUILD.gn @@ -5,6 +5,11 @@ import("//build/config/android/config.gni") import("//build/config/android/rules.gni") +content_jni_gypi_values = exec_script("//build/gypi_to_gn.py", + [ rebase_path("../../content_jni.gypi") ], + "scope", + [ "../../content_jni.gypi" ]) + android_aidl("common_aidl") { interface_file = "java/src/org/chromium/content/common/common.aidl" import_include = "java/src" @@ -200,11 +205,23 @@ java_cpp_template("content_gamepad_mapping_java") { ] } -generate_jar_jni("content_jni_headers") { +generate_jar_jni("jar_jni") { jni_package = "content" classes = [ - "android/view/MotionEvent.class", "java/util/HashSet.class", + "android/view/MotionEvent.class", + ] +} + +generate_jni("content_jni_headers") { + sources = rebase_path(content_jni_gypi_values.sources, "", "../..") + jni_package = "content" +} + +group("jni") { + deps = [ + ":content_jni_headers", + ":jar_jni", ] } diff --git a/content/renderer/BUILD.gn b/content/renderer/BUILD.gn index 57dd73c..06eb947 100644 --- a/content/renderer/BUILD.gn +++ b/content/renderer/BUILD.gn @@ -80,6 +80,7 @@ source_set("renderer") { sources -= [ "accessibility/renderer_accessibility_focus_only.cc", "media/audio_decoder.cc", + "media/crypto/encrypted_media_player_support_impl.cc", ] sources += [ "external_popup_menu.cc", diff --git a/content/shell/BUILD.gn b/content/shell/BUILD.gn index 6621e63..570d154 100644 --- a/content/shell/BUILD.gn +++ b/content/shell/BUILD.gn @@ -264,7 +264,7 @@ static_library("content_shell_lib") { } if (is_android) { - deps += [ ":content_shell_jni_headers" ] + deps += [ "//content/shell/android:content_shell_jni_headers" ] #deps -= [ "copy_test_netscape_plugin" ] TODO(GYP) } @@ -292,6 +292,11 @@ static_library("content_shell_lib") { } else { sources += [ "browser/shell_aura.cc" ] } + } else { + sources -= [ + "browser/shell_platform_data_aura.cc", + "browser/shell_platform_data_aura.h", + ] } # The test plugin relies on X11. @@ -430,6 +435,9 @@ repack("pak") { } } +# TODO(GYP): Figure out what this should be on android +if (!is_android) { + executable("content_shell") { testonly = true # TODO(GYP) mac resource bundle stuff for this target. @@ -446,7 +454,6 @@ executable("content_shell") { ":content_shell_lib", ":pak", "//base/allocator", - "//third_party/mesa:osmesa", ] if (is_win) { @@ -461,7 +468,7 @@ executable("content_shell") { # TODO(GYP) lots of stuff from GYP file here. } - if (!is_android || !is_android_webview_build) { + if (is_android && !is_android_webview_build) { # Some tests rely on this tool. It might be nicer if these tests relied on # image diff rather than having content shell depend on it. datadeps = [ @@ -469,3 +476,5 @@ executable("content_shell") { ] } } + +} diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn index 42b36db..18c555b 100644 --- a/content/test/BUILD.gn +++ b/content/test/BUILD.gn @@ -163,10 +163,18 @@ if (!is_ios) { ] if (is_android) { - #deps += [ "test_support_content_jni_headers" ] TODO(GYP) + deps += [ ":jni" ] } } + if (is_android) { + import("//build/config/android/rules.gni") + + generate_jni("jni") { + sources = [ "../public/test/android/javatests/src/org/chromium/content/browser/test/NestedSystemMessageHandler.java" ] + jni_package = "content/public/test" + } + } } # !is_ios # TODO(GYP): Unit test targets diff --git a/sandbox/linux/BUILD.gn b/sandbox/linux/BUILD.gn index 754664d..708543f 100644 --- a/sandbox/linux/BUILD.gn +++ b/sandbox/linux/BUILD.gn @@ -186,25 +186,27 @@ component("seccomp_bpf_helpers") { ] } +if (is_linux) { # The setuid sandbox for Linux. -executable("chrome_sandbox") { - sources = [ - "suid/common/sandbox.h", - "suid/common/suid_unsafe_environment_variables.h", - "suid/linux_util.c", - "suid/linux_util.h", - "suid/process_util.h", - "suid/process_util_linux.c", - "suid/sandbox.c", - ] + executable("chrome_sandbox") { + sources = [ + "suid/common/sandbox.h", + "suid/common/suid_unsafe_environment_variables.h", + "suid/linux_util.c", + "suid/linux_util.h", + "suid/process_util.h", + "suid/process_util_linux.c", + "suid/sandbox.c", + ] - cflags = [ - # For ULLONG_MAX - "-std=gnu99", - # These files have a suspicious comparison. - # TODO fix this and re-enable this warning. - "-Wno-sign-compare", - ] + cflags = [ + # For ULLONG_MAX + "-std=gnu99", + # These files have a suspicious comparison. + # TODO fix this and re-enable this warning. + "-Wno-sign-compare", + ] + } } component("sandbox_services") { @@ -263,19 +265,21 @@ source_set("libc_urandom_override") { ] } -component("suid_sandbox_client") { - sources = [ - "suid/common/sandbox.h", - "suid/common/suid_unsafe_environment_variables.h", - "suid/client/setuid_sandbox_client.cc", - "suid/client/setuid_sandbox_client.h", - ] - defines = [ "SANDBOX_IMPLEMENTATION" ] +if (compile_suid_client) { + component("suid_sandbox_client") { + sources = [ + "suid/common/sandbox.h", + "suid/common/suid_unsafe_environment_variables.h", + "suid/client/setuid_sandbox_client.cc", + "suid/client/setuid_sandbox_client.h", + ] + defines = [ "SANDBOX_IMPLEMENTATION" ] - deps = [ - ":sandbox_services", - "//base", - ] + deps = [ + ":sandbox_services", + "//base", + ] + } } if (is_android) { |