# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. 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" sources = [ "java/src/org/chromium/content/common/IChildProcessCallback.aidl", "java/src/org/chromium/content/common/IChildProcessService.aidl", ] } android_resources("content_java_resources") { deps = [ ":content_strings_grd", "//ui/android:ui_java_resources", ] custom_package = "org.chromium.content" resource_dirs = [ "java/res" ] } android_library("content_java") { deps = [ ":content_java_resources", "//base:base_java", "//media/base/android:media_java", "//net/android:net_java", "//ui/android:ui_java", "//third_party/jsr-305:jsr_305_javalib", #"//content:content_common", ] srcjar_deps = [ ":common_aidl", ":content_gamepad_mapping_java", ":gesture_event_type_java", ":popup_item_type_java", ":result_codes_java", ":selection_event_type_java", ":speech_recognition_error_java", ":top_controls_state_java", ":screen_orientation_values_java", ] DEPRECATED_java_in_dir = "java/src" if (!is_android_webview_build) { deps += [ "//third_party/eyesfree:eyesfree_java", ] } } java_strings_grd("content_strings_grd") { grd_file = "java/strings/android_content_strings.grd" outputs = [ "values-am/android_content_strings.xml", "values-ar/android_content_strings.xml", "values-bg/android_content_strings.xml", "values-ca/android_content_strings.xml", "values-cs/android_content_strings.xml", "values-da/android_content_strings.xml", "values-de/android_content_strings.xml", "values-el/android_content_strings.xml", "values/android_content_strings.xml", "values-en-rGB/android_content_strings.xml", "values-es/android_content_strings.xml", "values-es-rUS/android_content_strings.xml", "values-fa/android_content_strings.xml", "values-fi/android_content_strings.xml", "values-tl/android_content_strings.xml", "values-fr/android_content_strings.xml", "values-hi/android_content_strings.xml", "values-hr/android_content_strings.xml", "values-hu/android_content_strings.xml", "values-in/android_content_strings.xml", "values-it/android_content_strings.xml", "values-iw/android_content_strings.xml", "values-ja/android_content_strings.xml", "values-ko/android_content_strings.xml", "values-lt/android_content_strings.xml", "values-lv/android_content_strings.xml", "values-nl/android_content_strings.xml", "values-nb/android_content_strings.xml", "values-pl/android_content_strings.xml", "values-pt-rBR/android_content_strings.xml", "values-pt-rPT/android_content_strings.xml", "values-ro/android_content_strings.xml", "values-ru/android_content_strings.xml", "values-sk/android_content_strings.xml", "values-sl/android_content_strings.xml", "values-sr/android_content_strings.xml", "values-sv/android_content_strings.xml", "values-sw/android_content_strings.xml", "values-th/android_content_strings.xml", "values-tr/android_content_strings.xml", "values-uk/android_content_strings.xml", "values-vi/android_content_strings.xml", "values-zh-rCN/android_content_strings.xml", "values-zh-rTW/android_content_strings.xml", ] } java_cpp_template("gesture_event_type_java") { sources = [ "java/src/org/chromium/content/browser/GestureEventType.template", ] package_name = "org/chromium/content/browser" inputs = [ "//content/browser/android/gesture_event_type_list.h" ] } java_cpp_template("popup_item_type_java") { sources = [ "java/src/org/chromium/content/browser/input/PopupItemType.template", ] package_name = "org/chromium/content/browser/input" inputs = [ "//content/browser/android/popup_item_type_list.h" ] } java_cpp_template("result_codes_java") { sources = [ "java/src/org/chromium/content/common/ResultCodes.template", ] package_name = "org/chromium/content/common" inputs = [ "//content/public/common/result_codes_list.h" ] } java_cpp_template("selection_event_type_java") { sources = [ "java/src/org/chromium/content/browser/input/SelectionEventType.template", ] package_name = "org/chromium/content/browser/input" inputs = [ "//content/browser/renderer_host/input/selection_event_type_list.h" ] } java_cpp_template("speech_recognition_error_java") { sources = [ "java/src/org/chromium/content/browser/SpeechRecognitionError.template", ] package_name = "org/chromium/content/browser" inputs = [ "//content/public/common/speech_recognition_error_list.h" ] } java_cpp_template("top_controls_state_java") { sources = [ "java/src/org/chromium/content/common/TopControlsState.template", ] package_name = "org/chromium/content/common" inputs = [ "//content/public/common/top_controls_state_list.h" ] } java_cpp_template("screen_orientation_values_java") { sources = [ "java/src/org/chromium/content_public/common/ScreenOrientationValues.template", ] package_name = "org/chromium/content_public/common" inputs = [ "//content/public/common/screen_orientation_values_list.h" ] } java_cpp_template("content_gamepad_mapping_java") { sources = [ "java/src/org/chromium/content/browser/input/CanonicalAxisIndex.template", "java/src/org/chromium/content/browser/input/CanonicalButtonIndex.template", ] package_name = "org/chromium/content/common" inputs = [ "//content/browser/gamepad/canonical_axis_index_list.h", "//content/browser/gamepad/canonical_button_index_list.h", ] } generate_jar_jni("jar_jni") { jni_package = "content" classes = [ "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", ] } android_library("content_javatests") { testonly = true deps = [ "//base:base_java", "//base:base_java_test_support", "//content/public/test/android:content_java_test_support", "//content/shell/android:content_shell_java", "//content/shell/android:content_shell_java_resources", "//content/shell/android:content_shell_apk_java", "//content/shell/android:content_shell_test_java", "//media/base/android:media_java", "//net/android:net_java", "//net/android:net_java_test_support", "//ui/android:ui_java", ":content_java", ] DEPRECATED_java_in_dir = "javatests/src" } # TODO(GYP): content_icudata