# Copyright 2015 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. { 'includes': [ '../../chrome/chrome_android_paks.gypi', # Included for the list of pak resources. '../../build/util/version.gypi' ], 'variables': { 'chromium_code': 1, 'package_name': 'chrome_public_apk', 'manifest_package': 'org.chromium.chrome', 'chrome_public_apk_manifest': '<(SHARED_INTERMEDIATE_DIR)/chrome_public_apk_manifest/AndroidManifest.xml', 'chrome_public_test_apk_manifest': '<(SHARED_INTERMEDIATE_DIR)/chrome_public_test_apk_manifest/AndroidManifest.xml', 'never_lint': 1, 'chrome_java_dir': 'java_staging', 'chrome_java_tests_dir': 'javatests', 'chrome_java_test_support_dir': '../test/android/javatests_staging', 'chrome_native_sources_dir': '../browser/android/', # This list is shared with GN. 'chrome_staging_jni_files': [ '<(chrome_java_dir)/src/org/chromium/chrome/browser/bookmark/EditBookmarkHelper.java', '<(chrome_java_dir)/src/org/chromium/chrome/browser/compositor/CompositorView.java', '<(chrome_java_dir)/src/org/chromium/chrome/browser/compositor/scene_layer/ContextualSearchSceneLayer.java', '<(chrome_java_dir)/src/org/chromium/chrome/browser/compositor/scene_layer/ReaderModeSceneLayer.java', '<(chrome_java_dir)/src/org/chromium/chrome/browser/compositor/scene_layer/TabListSceneLayer.java', '<(chrome_java_dir)/src/org/chromium/chrome/browser/compositor/scene_layer/TabStripSceneLayer.java', '<(chrome_java_dir)/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java', '<(chrome_java_dir)/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchTabHelper.java', '<(chrome_java_dir)/src/org/chromium/chrome/browser/document/DocumentWebContentsDelegate.java', '<(chrome_java_dir)/src/org/chromium/chrome/browser/rlz/RevenueStats.java', '<(chrome_java_dir)/src/org/chromium/chrome/browser/tab/ThumbnailTabHelper.java', ], # This list is shared with GN. 'chrome_staging_native_sources': [ '<(chrome_native_sources_dir)/bookmark/edit_bookmark_helper.cc', '<(chrome_native_sources_dir)/bookmark/edit_bookmark_helper.h', '<(chrome_native_sources_dir)/chrome_main_delegate_staging_android.cc', '<(chrome_native_sources_dir)/chrome_main_delegate_staging_android.h', '<(chrome_native_sources_dir)/compositor/compositor_view.cc', '<(chrome_native_sources_dir)/compositor/compositor_view.h', '<(chrome_native_sources_dir)/compositor/layer/reader_mode_layer.cc', '<(chrome_native_sources_dir)/compositor/layer/reader_mode_layer.h', '<(chrome_native_sources_dir)/compositor/layer/tab_handle_layer.cc', '<(chrome_native_sources_dir)/compositor/layer/tab_handle_layer.h', '<(chrome_native_sources_dir)/compositor/scene_layer/contextual_search_scene_layer.cc', '<(chrome_native_sources_dir)/compositor/scene_layer/contextual_search_scene_layer.h', '<(chrome_native_sources_dir)/compositor/scene_layer/reader_mode_scene_layer.cc', '<(chrome_native_sources_dir)/compositor/scene_layer/reader_mode_scene_layer.h', '<(chrome_native_sources_dir)/compositor/scene_layer/tab_list_scene_layer.cc', '<(chrome_native_sources_dir)/compositor/scene_layer/tab_list_scene_layer.h', '<(chrome_native_sources_dir)/compositor/scene_layer/tab_strip_scene_layer.cc', '<(chrome_native_sources_dir)/compositor/scene_layer/tab_strip_scene_layer.h', '<(chrome_native_sources_dir)/contextualsearch/contextual_search_context.cc', '<(chrome_native_sources_dir)/contextualsearch/contextual_search_context.h', '<(chrome_native_sources_dir)/contextualsearch/contextual_search_delegate.cc', '<(chrome_native_sources_dir)/contextualsearch/contextual_search_delegate.h', '<(chrome_native_sources_dir)/contextualsearch/contextual_search_manager.cc', '<(chrome_native_sources_dir)/contextualsearch/contextual_search_manager.h', '<(chrome_native_sources_dir)/contextualsearch/contextual_search_tab_helper.cc', '<(chrome_native_sources_dir)/contextualsearch/contextual_search_tab_helper.h', '<(chrome_native_sources_dir)/document/document_web_contents_delegate.cc', '<(chrome_native_sources_dir)/rlz/revenue_stats.cc', '<(chrome_native_sources_dir)/rlz/revenue_stats.h', '<(chrome_native_sources_dir)/staging_jni_registrar.cc', '<(chrome_native_sources_dir)/staging_jni_registrar.h', '<(chrome_native_sources_dir)/tab/thumbnail_tab_helper_android.cc', '<(chrome_native_sources_dir)/tab/thumbnail_tab_helper_android.h', ], # This list is shared with GN. # Defines a list of source files should be present in the open-source # chrome-apk but not in the published static_library which is included in the # real chrome for android. 'chrome_public_app_native_sources': [ '<(chrome_native_sources_dir)/chrome_entry_point.cc', '<(chrome_native_sources_dir)/chrome_main_delegate_staging_android_initializer.cc', '<(chrome_native_sources_dir)/chrome_staging_jni_onload.cc', '<(chrome_native_sources_dir)/chrome_staging_jni_onload.h', ], }, 'targets': [ { # GN: //chrome/browser/android:chrome_staging 'target_name': 'libchrome_staging', 'type': 'static_library', 'dependencies': [ 'staging_jni_headers', '<(DEPTH)/chrome/chrome.gyp:browser', '<(DEPTH)/components/components.gyp:component_metrics_proto', '<(DEPTH)/skia/skia.gyp:skia', '<(DEPTH)/third_party/leveldatabase/leveldatabase.gyp:leveldatabase', ], 'sources': [ '<@(chrome_staging_native_sources)', ], 'include_dirs': [ '<(DEPTH)', '<(SHARED_INTERMEDIATE_DIR)/staging/android', '<(android_ndk_include)', # For native_window.h, GL includes, etc. '<(DEPTH)/skia/config', ], 'link_settings': { 'libraries': [ '-landroid', # ANativeWindow '-ljnigraphics', # NDK access to bitmap ], }, 'conditions': [ ['safe_browsing!=0', { 'sources': [ '<(chrome_native_sources_dir)/spdy_proxy_resource_throttle.cc', '<(chrome_native_sources_dir)/spdy_proxy_resource_throttle.h', ], }], ], }, { # GN: //chrome/android:staging_jni_headers 'target_name': 'staging_jni_headers', 'type': 'none', 'sources': [ '<@(chrome_staging_jni_files)', ], 'variables': { 'jni_gen_package': 'staging/android', }, 'includes': [ '../../build/jni_generator.gypi' ], }, { # GN: //chrome/android:chrome_staging_java 'target_name': 'chrome_staging_java', 'type': 'none', 'variables': { 'java_in_dir': '<(chrome_java_dir)', 'R_package': 'com.google.android.apps.chrome', 'R_package_relpath': 'com/google/android/apps/chrome', 'has_java_resources': 1, 'res_channel_dir': '<(chrome_java_dir)/res_default', 'res_extra_dirs': ['<(res_channel_dir)'], 'res_extra_files': ['