summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorcjhopman <cjhopman@chromium.org>2014-10-13 15:47:54 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-13 22:48:10 +0000
commit11a68cbf1df1110ebac0b649edf2aef22682387e (patch)
tree8972229c5495f4435deff5083b0a61be2e18fb3b /chrome
parent93bce7ece7f312875a9a2fd20c25c7f769e7a7e6 (diff)
downloadchromium_src-11a68cbf1df1110ebac0b649edf2aef22682387e.zip
chromium_src-11a68cbf1df1110ebac0b649edf2aef22682387e.tar.gz
chromium_src-11a68cbf1df1110ebac0b649edf2aef22682387e.tar.bz2
Make chrome_shell_apk build
This mostly just adds the chrome_shell_apk build definition and those of a whole bunch of targets. Adds a simple check that when DEPRECATED_java_in_dir is used, it actually includes the "src" at the end (GYP just assumes that you really meant that java files are in <(java_in_dir)/src). Makes the call to process_resources only generate R.java for extra packages when being run as part of the apk step (otherwise, for example, both chrome resources and content resources would contain an R.java for net resources and compilation would fail). Depends on https://codereview.chromium.org/581273004/ Adds the following targets -- and enables ~300 more (550 counting template-generated inner targets): //chrome:chrome_android_core //chrome/android:chrome_strings_grd //chrome/android:chrome_java //chrome/android:activity_type_ids_javagen //chrome/android:app_banner_metrics_ids_javagen //chrome/android:resource_id_javagen //chrome/android:profile_account_management_metrics_javagen //chrome/android:profile_sync_service_model_type_selection_javagen //chrome/android:toolbar_model_security_levels_javagen //chrome/android:tab_load_status_javagen //chrome/android:chrome_shell_base //chrome/android:chrome_shell //chrome/android:chrome_sync_shell //chrome/android:chrome_shell_resources //chrome/android:chrome_shell_java //chrome/android:chrome_shell_assets //chrome/android:chrome_shell_apk //chrome/android:chrome_sync_shell_apk //components/bookmarks:bookmarks_java //components/bookmarks:bookmarks_jni_headers //components/bookmarks:bookmark_type_javagen //components/dom_distiller/android:dom_distiller_core_java //components/dom_distiller/android:dom_distiller_core_font_family_javagen //components/dom_distiller/android:dom_distiller_core_theme_javagen //components/enhanced_bookmarks:jni_headers //components/enhanced_bookmarks/android:enhanced_bookmarks_java //components/gcm_driver:gcm_driver_java //components/gcm_driver:jni_headers //components/navigation_interception/android:navigation_interception_java //components/variations:variations_java //components/web_contents_delegate_android:web_contents_delegate_android //components/web_contents_delegate_android:web_contents_delegate_android_java //components/web_contents_delegate_android:web_contents_delegate_android_jni_headers //printing:printing_java //sync:fake_server_jni //sync:sync_java_test_support //sync:test_support_sync_fake_server_android //sync:sync_unit_tests_apk //sync/android:sync_java //sync/android:sync_javatests BUG=359249 TBR=ben Review URL: https://codereview.chromium.org/570203002 Cr-Commit-Position: refs/heads/master@{#299381}
Diffstat (limited to 'chrome')
-rw-r--r--chrome/BUILD.gn51
-rw-r--r--chrome/android/BUILD.gn409
-rw-r--r--chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellActivity.java79
-rw-r--r--chrome/browser/ui/BUILD.gn7
-rw-r--r--chrome/chrome.gyp4
-rw-r--r--chrome/chrome_android.gypi2
-rw-r--r--chrome/chrome_browser.gypi8
-rw-r--r--chrome/chrome_shell.gypi7
-rw-r--r--chrome/common/BUILD.gn5
9 files changed, 526 insertions, 46 deletions
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
index 4bf0a5d..f575359 100644
--- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn
@@ -8,6 +8,10 @@ import("//build/config/ui.gni")
import("//chrome/chrome_repack_locales.gni")
import("//chrome/version.gni")
+if (is_android) {
+ import("//build/config/android/rules.gni")
+}
+
if (!is_android) {
# TODO(GYP) for Windows need to the the reorder-imports step which probably
@@ -322,7 +326,7 @@ group("packed_resources") {
}
repack("packed_extra_resources") {
- visibility = [ ":*" ]
+ visibility = [ "./*" ]
sources = [
"$root_gen_dir/chrome/browser_resources.pak",
"$root_gen_dir/chrome/chrome_unscaled_resources.pak",
@@ -522,3 +526,48 @@ group("strings") {
"//chrome/app/resources:locale_settings",
]
}
+
+if (is_android) {
+
+# GYP: //chrome/chrome.gyp:page_info_connection_type_java
+java_cpp_enum("page_info_connection_type_javagen") {
+ sources = [
+ "browser/ui/android/website_settings_popup_android.h"
+ ]
+ outputs = [
+ "org/chromium/chrome/browser/PageInfoConnectionType.java",
+ ]
+}
+
+# GYP: //chrome/chrome_android.gypi:chrome_android_core
+static_library("chrome_android_core") {
+ sources = [
+ "app/android/chrome_android_initializer.cc",
+ "app/android/chrome_android_initializer.h",
+ "app/android/chrome_main_delegate_android.cc",
+ "app/android/chrome_main_delegate_android.h",
+ "app/chrome_main_delegate.cc",
+ "app/chrome_main_delegate.h",
+ ]
+
+ include_dirs = [
+ android_ndk_include_dir,
+ ]
+
+ libs = [
+ "android",
+ "jnigraphics",
+ ]
+
+ deps = [
+ "//chrome/browser",
+ "//chrome/browser/ui",
+ "//chrome/plugin",
+ "//chrome/renderer",
+ "//chrome/utility",
+ "//components/enhanced_bookmarks",
+ "//content/public/app:browser",
+ ]
+}
+
+}
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
new file mode 100644
index 0000000..202fcd3
--- /dev/null
+++ b/chrome/android/BUILD.gn
@@ -0,0 +1,409 @@
+# 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")
+import("//chrome/version.gni")
+import("//third_party/icu/config.gni")
+
+
+# GYP: //chrome/chrome.gyp:chrome_java (resources part)
+android_resources("chrome_java_resources") {
+ resource_dirs = [
+ "java/res",
+ ]
+ deps = [
+ ":chrome_strings_grd",
+ "//content/public/android:content_java_resources",
+ "//chrome/app:java_strings_grd",
+ "//third_party/android_tools:android_support_v7_appcompat_resources",
+ ]
+ custom_package = "org.chromium.chrome"
+}
+
+# GYP: //chrome/chrome.gyp:chrome_strings_grd
+java_strings_grd("chrome_strings_grd") {
+ grd_file = "java/strings/android_chrome_strings.grd"
+ outputs = [
+ "values-am/android_chrome_strings.xml",
+ "values-ar/android_chrome_strings.xml",
+ "values-bg/android_chrome_strings.xml",
+ "values-ca/android_chrome_strings.xml",
+ "values-cs/android_chrome_strings.xml",
+ "values-da/android_chrome_strings.xml",
+ "values-de/android_chrome_strings.xml",
+ "values-el/android_chrome_strings.xml",
+ "values/android_chrome_strings.xml",
+ "values-en-rGB/android_chrome_strings.xml",
+ "values-es/android_chrome_strings.xml",
+ "values-es-rUS/android_chrome_strings.xml",
+ "values-fa/android_chrome_strings.xml",
+ "values-fi/android_chrome_strings.xml",
+ "values-tl/android_chrome_strings.xml",
+ "values-fr/android_chrome_strings.xml",
+ "values-hi/android_chrome_strings.xml",
+ "values-hr/android_chrome_strings.xml",
+ "values-hu/android_chrome_strings.xml",
+ "values-in/android_chrome_strings.xml",
+ "values-it/android_chrome_strings.xml",
+ "values-iw/android_chrome_strings.xml",
+ "values-ja/android_chrome_strings.xml",
+ "values-ko/android_chrome_strings.xml",
+ "values-lt/android_chrome_strings.xml",
+ "values-lv/android_chrome_strings.xml",
+ "values-nl/android_chrome_strings.xml",
+ "values-nb/android_chrome_strings.xml",
+ "values-pl/android_chrome_strings.xml",
+ "values-pt-rBR/android_chrome_strings.xml",
+ "values-pt-rPT/android_chrome_strings.xml",
+ "values-ro/android_chrome_strings.xml",
+ "values-ru/android_chrome_strings.xml",
+ "values-sk/android_chrome_strings.xml",
+ "values-sl/android_chrome_strings.xml",
+ "values-sr/android_chrome_strings.xml",
+ "values-sv/android_chrome_strings.xml",
+ "values-sw/android_chrome_strings.xml",
+ "values-th/android_chrome_strings.xml",
+ "values-tr/android_chrome_strings.xml",
+ "values-uk/android_chrome_strings.xml",
+ "values-vi/android_chrome_strings.xml",
+ "values-zh-rCN/android_chrome_strings.xml",
+ "values-zh-rTW/android_chrome_strings.xml",
+ ]
+}
+
+# GYP: //chrome/chrome.gyp:chrome_java
+android_library("chrome_java") {
+ deps = [
+ ":chrome_java_resources",
+ "//base:base_java",
+ "//net/android:net_java",
+ "//components/bookmarks/common/android:bookmarks_java",
+ "//components/dom_distiller/android:dom_distiller_core_java",
+ "//components/gcm_driver/android:gcm_driver_java",
+ "//components/invalidation:java",
+ "//components/navigation_interception/android:navigation_interception_java",
+ "//components/variations/android:variations_java",
+ "//components/web_contents_delegate_android:web_contents_delegate_android_java",
+ "//content/public/android:content_java",
+ "//printing:printing_java",
+ "//sync/android:sync_java",
+ "//third_party/android_tools:android_support_v13_java",
+ "//third_party/android_tools:android_support_v7_appcompat_java",
+ "//third_party/cacheinvalidation:cacheinvalidation_javalib",
+ "//third_party/cacheinvalidation:cacheinvalidation_proto_java",
+ "//third_party/jsr-305:jsr_305_javalib",
+ "//ui/android:ui_java",
+ "//ui/android:ui_java_resources",
+ ]
+
+ srcjar_deps = [
+ ":activity_type_ids_javagen",
+ ":app_banner_metrics_ids_javagen",
+ ":profile_account_management_metrics_javagen",
+ ":profile_sync_service_model_type_selection_javagen",
+ ":resource_id_javagen",
+ ":toolbar_model_security_levels_javagen",
+ ":tab_load_status_javagen",
+ ":chrome_version_srcjar",
+ "//chrome:page_info_connection_type_javagen",
+ ]
+
+ DEPRECATED_java_in_dir = "java/src"
+}
+
+# GYP: //chrome/chrome_browser.gypi:activity_type_ids_java
+java_cpp_template("activity_type_ids_javagen") {
+ sources = [
+ "java/ActivityTypeIds.template",
+ ]
+ package_name = "org/chromium/chrome/browser"
+ inputs = [
+ "../browser/android/activity_type_id_list.h"
+ ]
+}
+
+# GYP: //chrome/chrome_browser.gypi:app_banner_metrics_ids_java
+java_cpp_template("app_banner_metrics_ids_javagen") {
+ sources = [
+ "java/AppBannerMetricsIds.template",
+ ]
+ package_name = "org/chromium/chrome/browser/banners"
+ inputs = [
+ "../browser/android/banners/app_banner_metrics_id_list.h"
+ ]
+}
+
+# GYP: //chrome/chrome_browser.gypi:resource_id_java
+java_cpp_template("resource_id_javagen") {
+ sources = [
+ "java/ResourceId.template",
+ ]
+ package_name = "org/chromium/chrome/browser"
+ inputs = [
+ "../browser/android/resource_id.h"
+ ]
+}
+
+# GYP: //chrome/chrome_browser.gypi:profile_account_management_metrics_java
+java_cpp_template("profile_account_management_metrics_javagen") {
+ sources = [
+ "java/ProfileAccountManagementMetrics.template",
+ ]
+ package_name = "org/chromium/chrome/browser/profiles"
+ inputs = [
+ "../browser/profiles/profile_metrics_list.h"
+ ]
+}
+
+# GYP: //chrome/chrome_browser.gypi:profile_sync_service_model_type_selection_java
+java_cpp_template("profile_sync_service_model_type_selection_javagen") {
+ sources = [
+ "java/ModelTypeSelection.template",
+ ]
+ package_name = "org/chromium/chrome/browser/sync"
+ inputs = [
+ "../browser/sync/profile_sync_service_model_type_selection_android.h"
+ ]
+}
+
+# GYP: //chrome/chrome_browser.gypi:toolbar_model_security_levels_java
+java_cpp_template("toolbar_model_security_levels_javagen") {
+ sources = [
+ "java/ToolbarModelSecurityLevel.template",
+ ]
+ package_name = "org/chromium/chrome/browser/ui/toolbar"
+ inputs = [
+ "../browser/ui/toolbar/toolbar_model_security_level_list.h"
+ ]
+}
+
+# GYP: //chrome/chrome_browser.gypi:tab_load_status_java
+java_cpp_template("tab_load_status_javagen") {
+ sources = [
+ "java/TabLoadStatus.template",
+ ]
+ package_name = "org/chromium/chrome/browser"
+ inputs = [
+ "../browser/android/tab_load_status.h"
+ ]
+}
+
+# GYP: //chrome/chrome_shell.gypi:libchromeshell_base
+static_library("chrome_shell_base") {
+ sources = [
+ "shell/chrome_shell_google_location_settings_helper.cc",
+ "shell/chrome_shell_google_location_settings_helper.h",
+ ]
+
+ deps = [
+ "//chrome/browser/ui",
+ "//chrome:chrome_android_core",
+ "//base",
+ "//base/allocator",
+ "//content/public/app:browser",
+ "//skia",
+ ]
+
+ # TODO(GYP):
+ #[ 'order_profiling!=0', {
+ #'conditions': [
+ #[ 'OS=="android"', {
+ #'dependencies': [ '../tools/cygprofile/cygprofile.gyp:cygprofile', ],
+ #}],
+ #],
+ #}],
+}
+
+# TODO(GYP, cjhopman): make chrome_shell_base actually link and then move it to
+# deps. Also, actually compile the main delegates at that point.
+# GYP: //chrome/chrome_browser.gypi:libchromeshell
+shared_library("chrome_shell") {
+ testonly = true
+ sources = [
+ # This file must always be included in the shared_library step to ensure
+ # JNI_OnLoad is exported.
+#"//chrome/app/android/chrome_jni_onload.cc",
+#"shell/chrome_main_delegate_chrome_shell_android.cc",
+#"shell/chrome_main_delegate_chrome_shell_android.h",
+ ]
+ deps = [
+#":chrome_shell_base",
+ ]
+ deps = [ ":chrome_java" ]
+ datadeps = [
+ ":chrome_shell_base"
+ ]
+}
+
+# GYP: //chrome/chrome_browser.gypi:libchromesyncshell
+shared_library("chrome_sync_shell") {
+ testonly = true
+ sources = [
+ # This file must always be included in the shared_library step to ensure
+ # JNI_OnLoad is exported.
+#"//chrome/app/android/chrome_jni_onload.cc",
+#"sync_shell/chrome_main_delegate_chrome_sync_shell_android.cc",
+#"sync_shell/chrome_main_delegate_chrome_sync_shell_android.h",
+ ]
+ deps = [
+ "//sync:test_support_sync_fake_server_android",
+ ]
+ datadeps = [
+ ":chrome_shell_base",
+ ]
+}
+
+# GYP: N/A
+android_resources("chrome_shell_resources") {
+ deps = [
+ ":chrome_java_resources",
+ ]
+ testonly = true
+ resource_dirs = [ "shell/res" ]
+ custom_package = "org.chromium.chrome.shell"
+}
+
+# GYP: N/A
+android_library("chrome_shell_java") {
+ testonly = true
+ deps = [
+ ":chrome_shell_resources",
+ ":chrome_java",
+ "//base:base_java",
+ "//content/public/android:content_java",
+ "//components/dom_distiller/android:dom_distiller_core_java",
+ "//components/web_contents_delegate_android:web_contents_delegate_android_java",
+ "//printing:printing_java",
+ "//net/android:net_java",
+ "//sync/android:sync_java",
+ "//ui/android:ui_java",
+ ]
+ DEPRECATED_java_in_dir = "shell/java/src"
+}
+
+chrome_shell_assets_dir = "$root_build_dir/chrome_shell/assets"
+
+# GYP: N/A
+copy_ex("chrome_shell_assets") {
+ clear_dir = true
+ dest = chrome_shell_assets_dir
+ sources = [
+ "$root_build_dir/resources.pak",
+ "$root_build_dir/chrome_100_percent.pak",
+ "$root_build_dir/locales/am.pak",
+ "$root_build_dir/locales/ar.pak",
+ "$root_build_dir/locales/bg.pak",
+ "$root_build_dir/locales/ca.pak",
+ "$root_build_dir/locales/cs.pak",
+ "$root_build_dir/locales/da.pak",
+ "$root_build_dir/locales/de.pak",
+ "$root_build_dir/locales/el.pak",
+ "$root_build_dir/locales/en-GB.pak",
+ "$root_build_dir/locales/en-US.pak",
+ "$root_build_dir/locales/es.pak",
+ "$root_build_dir/locales/es-419.pak",
+ "$root_build_dir/locales/fa.pak",
+ "$root_build_dir/locales/fi.pak",
+ "$root_build_dir/locales/fil.pak",
+ "$root_build_dir/locales/fr.pak",
+ "$root_build_dir/locales/he.pak",
+ "$root_build_dir/locales/hi.pak",
+ "$root_build_dir/locales/hr.pak",
+ "$root_build_dir/locales/hu.pak",
+ "$root_build_dir/locales/id.pak",
+ "$root_build_dir/locales/it.pak",
+ "$root_build_dir/locales/ja.pak",
+ "$root_build_dir/locales/ko.pak",
+ "$root_build_dir/locales/lt.pak",
+ "$root_build_dir/locales/lv.pak",
+ "$root_build_dir/locales/nb.pak",
+ "$root_build_dir/locales/nl.pak",
+ "$root_build_dir/locales/pl.pak",
+ "$root_build_dir/locales/pt-BR.pak",
+ "$root_build_dir/locales/pt-PT.pak",
+ "$root_build_dir/locales/ro.pak",
+ "$root_build_dir/locales/ru.pak",
+ "$root_build_dir/locales/sk.pak",
+ "$root_build_dir/locales/sl.pak",
+ "$root_build_dir/locales/sr.pak",
+ "$root_build_dir/locales/sv.pak",
+ "$root_build_dir/locales/sw.pak",
+ "$root_build_dir/locales/th.pak",
+ "$root_build_dir/locales/tr.pak",
+ "$root_build_dir/locales/uk.pak",
+ "$root_build_dir/locales/vi.pak",
+ "$root_build_dir/locales/zh-CN.pak",
+ "$root_build_dir/locales/zh-TW.pak",
+ ]
+ deps = [
+ "//chrome:packed_resources",
+ "//chrome:packed_extra_resources",
+ ]
+
+ if (icu_use_data_file) {
+ sources += [
+ "$root_build_dir/icudtl.dat"
+ ]
+ }
+}
+
+#TODO(GYP):
+#'variables': {
+#'conditions': [
+#['component != "shared_library" and target_arch != "arm64" and target_arch != "x64" and profiling_full_stack_frames != 1', {
+## Only enable the chromium linker on regular builds, since the
+## component build crashes on Android 4.4. See b/11379966
+#'use_chromium_linker': '1',
+#}],
+#],
+#},
+
+# GYP: //chrome/chrome_browser.gypi:chrome_shell_apk
+android_apk("chrome_shell_apk") {
+ testonly = true
+ deps = [
+ ":chrome_shell_resources",
+ ":chrome_shell_java",
+ ":chrome_shell_assets",
+ ":chrome_shell",
+ ]
+ apk_name = "ChromeShell"
+ android_manifest = "shell/java/AndroidManifest.xml"
+ native_libs = [
+ "$root_build_dir/lib.stripped/libchrome_shell.so"
+ ]
+ asset_location = chrome_shell_assets_dir
+}
+
+# GYP: //chrome/chrome_browser.gypi:chrome_sync_shell_apk
+android_apk("chrome_sync_shell_apk") {
+ testonly = true
+ deps = [
+ ":chrome_shell_resources",
+ ":chrome_shell_java",
+ ":chrome_shell_assets",
+ ":chrome_sync_shell",
+ ]
+ apk_name = "ChromeSyncShell"
+ android_manifest = "sync_shell/java/AndroidManifest.xml"
+ native_libs = [
+ "$root_build_dir/lib.stripped/libchrome_sync_shell.so"
+ ]
+ asset_location = chrome_shell_assets_dir
+}
+
+# GYP: //chrome/chrome_android.gypi:chrome_version_java
+chrome_version_java_dir = "$root_gen_dir/templates/chrome_version_java"
+chrome_version_java_file = "$chrome_version_java_dir/org/chromium/chrome/browser/ChromeVersionConstants.java"
+process_version("chrome_version_java") {
+ source = "java/ChromeVersionConstants.java.version"
+ output = chrome_version_java_file
+}
+
+zip("chrome_version_srcjar") {
+ inputs = [ chrome_version_java_file ]
+ output = "$target_gen_dir/$target_name.srcjar"
+ base_dir = chrome_version_java_dir
+}
diff --git a/chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellActivity.java b/chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellActivity.java
index aa0ece9..b751a29 100644
--- a/chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellActivity.java
+++ b/chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellActivity.java
@@ -306,46 +306,45 @@ public class ChromeShellActivity extends Activity implements AppMenuPropertiesDe
containerView.requestFocus();
}
}
- switch (item.getItemId()) {
- case R.id.signin:
- if (ChromeSigninController.get(this).isSignedIn()) {
- SyncController.openSignOutDialog(getFragmentManager());
- } else if (AccountManagerHelper.get(this).hasGoogleAccounts()) {
- SyncController.openSigninDialog(getFragmentManager());
- } else {
- Toast.makeText(this, R.string.signin_no_account, Toast.LENGTH_SHORT).show();
- }
- return true;
- case R.id.print:
- if (activeTab != null) {
- mPrintingController.startPrint(new TabPrinter(activeTab),
- new PrintManagerDelegateImpl(this));
- }
- return true;
- case R.id.distill_page:
- if (activeTab != null) {
- DomDistillerTabUtils.distillCurrentPageAndView(
- activeTab.getContentViewCore().getWebContents());
- }
- return true;
- case R.id.back_menu_id:
- if (activeTab != null && activeTab.canGoBack()) {
- activeTab.goBack();
- }
- return true;
- case R.id.forward_menu_id:
- if (activeTab != null && activeTab.canGoForward()) {
- activeTab.goForward();
- }
- return true;
- case R.id.share_menu_id:
- case R.id.direct_share_menu_id:
- ShareHelper.share(item.getItemId() == R.id.direct_share_menu_id, this,
- activeTab.getTitle(), activeTab.getUrl(), null,
- Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
- return true;
- default:
- return super.onOptionsItemSelected(item);
+ int id = item.getItemId();
+ if (id == R.id.signin) {
+ if (ChromeSigninController.get(this).isSignedIn()) {
+ SyncController.openSignOutDialog(getFragmentManager());
+ } else if (AccountManagerHelper.get(this).hasGoogleAccounts()) {
+ SyncController.openSigninDialog(getFragmentManager());
+ } else {
+ Toast.makeText(this, R.string.signin_no_account, Toast.LENGTH_SHORT).show();
+ }
+ return true;
+ } else if (id == R.id.print) {
+ if (activeTab != null) {
+ mPrintingController.startPrint(new TabPrinter(activeTab),
+ new PrintManagerDelegateImpl(this));
+ }
+ return true;
+ } else if (id == R.id.distill_page) {
+ if (activeTab != null) {
+ DomDistillerTabUtils.distillCurrentPageAndView(
+ activeTab.getContentViewCore().getWebContents());
+ }
+ return true;
+ } else if (id == R.id.back_menu_id) {
+ if (activeTab != null && activeTab.canGoBack()) {
+ activeTab.goBack();
+ }
+ return true;
+ } else if (id == R.id.forward_menu_id) {
+ if (activeTab != null && activeTab.canGoForward()) {
+ activeTab.goForward();
+ }
+ return true;
+ } else if (id == R.id.share_menu_id || id == R.id.direct_share_menu_id) {
+ ShareHelper.share(item.getItemId() == R.id.direct_share_menu_id, this,
+ activeTab.getTitle(), activeTab.getUrl(), null,
+ Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
+ return true;
+ } else {
+ return super.onOptionsItemSelected(item);
}
}
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn
index bac985e..5c27fc5 100644
--- a/chrome/browser/ui/BUILD.gn
+++ b/chrome/browser/ui/BUILD.gn
@@ -440,11 +440,16 @@ source_set("test_support") {
"pdf/pdf_browsertest_base.h",
"test/test_confirm_bubble_model.cc",
"test/test_confirm_bubble_model.h",
- "views/find_bar_host_unittest_util_views.cc",
"website_settings/mock_permission_bubble_request.cc",
"website_settings/mock_permission_bubble_request.h",
]
+ if (toolkit_views) {
+ sources += [
+ "views/find_bar_host_unittest_util_views.cc",
+ ]
+ }
+
public_deps = [
":ui",
]
diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp
index 3a2af9f..2b6197b 100644
--- a/chrome/chrome.gyp
+++ b/chrome/chrome.gyp
@@ -577,6 +577,7 @@
{
'targets': [
{
+ # GN: //chrome/android:chrome_java
'target_name': 'chrome_java',
'type': 'none',
'dependencies': [
@@ -597,7 +598,6 @@
'../components/components.gyp:gcm_driver_java',
'../components/components.gyp:invalidation_java',
'../components/components.gyp:navigation_interception_java',
- '../components/components.gyp:sessions',
'../components/components.gyp:variations_java',
'../components/components.gyp:web_contents_delegate_android_java',
'../content/content.gyp:content_java',
@@ -621,6 +621,7 @@
],
},
{
+ # GN: //chrome/android:chrome_strings_grd
'target_name': 'chrome_strings_grd',
'type': 'none',
'variables': {
@@ -631,6 +632,7 @@
],
},
{
+ # GN: //chrome:page_info_connection_type_javagen
'target_name': 'page_info_connection_type_java',
'type': 'none',
'variables': {
diff --git a/chrome/chrome_android.gypi b/chrome/chrome_android.gypi
index f494b39..125ae1a 100644
--- a/chrome/chrome_android.gypi
+++ b/chrome/chrome_android.gypi
@@ -18,6 +18,7 @@
],
'targets': [
{
+ # GN: //chrome:chrome_android_core
'target_name': 'chrome_android_core',
'type': 'static_library',
'dependencies': [
@@ -52,6 +53,7 @@
},
},
{
+ # GYP: //chrome/android:chrome_version_java
'target_name': 'chrome_version_java',
'type': 'none',
'variables': {
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index 0274a79..9b4f0fc 100644
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -3493,6 +3493,7 @@
['OS=="android"', {
'targets': [
{
+ # GN: //chrome/browser:jni_headers
'target_name': 'chrome_browser_jni_headers',
'type': 'none',
'sources': [ '<@(chrome_browser_jni_sources)' ],
@@ -3502,6 +3503,7 @@
'includes': [ '../build/jni_generator.gypi' ],
},
{
+ # GN: //chrome/android:activity_type_ids_javagen
'target_name': 'activity_type_ids_java',
'type': 'none',
'sources': [
@@ -3514,6 +3516,7 @@
'includes': [ '../build/android/java_cpp_template.gypi' ],
},
{
+ # GN: //chrome/android:app_banner_metrics_ids_javagen
'target_name': 'app_banner_metrics_ids_java',
'type': 'none',
'sources': [
@@ -3526,6 +3529,7 @@
'includes': [ '../build/android/java_cpp_template.gypi' ],
},
{
+ # GN: //chrome/android:resource_id_javagen
'target_name': 'resource_id_java',
'type': 'none',
'sources': [
@@ -3538,6 +3542,7 @@
'includes': [ '../build/android/java_cpp_template.gypi' ],
},
{
+ # GN: //chrome/android/profile_account_management_metrics_javagen
'target_name': 'profile_account_management_metrics_java',
'type': 'none',
'sources': [
@@ -3550,6 +3555,7 @@
'includes': [ '../build/android/java_cpp_template.gypi' ],
},
{
+ # GN: //chrome/android:profile_sync_service_model_type_selection_javagen
'target_name': 'profile_sync_service_model_type_selection_java',
'type': 'none',
'sources': [
@@ -3562,6 +3568,7 @@
'includes': [ '../build/android/java_cpp_template.gypi' ],
},
{
+ # GN: //chrome/android:toolbar_model_security_levels_javagen
'target_name': 'toolbar_model_security_levels_java',
'type': 'none',
'sources': [
@@ -3574,6 +3581,7 @@
'includes': [ '../build/android/java_cpp_template.gypi' ],
},
{
+ # GN: //chrome/android:tab_load_status_javagen
'target_name': 'tab_load_status_java',
'type': 'none',
'sources': [
diff --git a/chrome/chrome_shell.gypi b/chrome/chrome_shell.gypi
index 81b99cc..20a7aae 100644
--- a/chrome/chrome_shell.gypi
+++ b/chrome/chrome_shell.gypi
@@ -12,6 +12,7 @@
},
'targets': [
{
+ # GN: //chrome/android:chrome_shell_base
'target_name': 'libchromeshell_base',
'type': 'static_library',
'dependencies': [
@@ -51,6 +52,7 @@
],
},
{
+ # GN: //chrome/android:chrome_shell
'target_name': 'libchromeshell',
'type': 'shared_library',
'sources': [
@@ -65,6 +67,7 @@
],
},
{
+ # GN: //chrome/android:chrome_sync_shell
'target_name': 'libchromesyncshell',
'type': 'shared_library',
'sources': [
@@ -80,6 +83,7 @@
],
},
{
+ # GN: //chrome/android:chrome_shell_apk
'target_name': 'chrome_shell_apk',
'type': 'none',
'dependencies': [
@@ -102,6 +106,7 @@
'includes': [ '../build/java_apk.gypi', ],
},
{
+ # GN: N/A
# chrome_shell_apk creates a .jar as a side effect. Any java targets
# that need that .jar in their classpath should depend on this target,
# chrome_shell_apk_java. Dependents of chrome_shell_apk receive its
@@ -132,6 +137,7 @@
],
},
{
+ # GN: //chrome/android:chrome_sync_shell_apk
'target_name': 'chrome_sync_shell_apk',
'type': 'none',
'dependencies': [
@@ -157,6 +163,7 @@
'includes': [ '../build/java_apk.gypi', ],
},
{
+ # GN: N/A
# chrome_sync_shell_apk creates a .jar as a side effect. Any java
# targets that need that .jar in their classpath should depend on this
# target. Dependents of chrome_sync_shell_apk receive its jar path in the
diff --git a/chrome/common/BUILD.gn b/chrome/common/BUILD.gn
index 082f3c1..d295f52 100644
--- a/chrome/common/BUILD.gn
+++ b/chrome/common/BUILD.gn
@@ -62,6 +62,8 @@ static_library("common") {
"//components/variations",
"//content/public/common",
"//crypto",
+ "//extensions:extensions_resources",
+ "//extensions/strings",
"//media/cast:net",
"//net",
"//skia",
@@ -104,8 +106,6 @@ static_library("common") {
"//chrome/common/extensions/api",
"//extensions/common",
"//extensions/common/api",
- "//extensions/strings",
- "//extensions:extensions_resources",
]
}
@@ -173,7 +173,6 @@ static_library("common") {
sources -= [
"badge_util.cc",
"chrome_version_info_posix.cc",
- "extensions/manifest_handlers/minimum_chrome_version_checker.cc",
"icon_with_badge_image_source.cc",
"media_galleries/metadata_types.h",
"spellcheck_common.cc",