Enable more targets in the Android GN build.

This enables some already-working targets and adds a missing cpufeatures dep to crypto to make it compile. I added a comment in the cpufeatures build file so I can find it more easily by grepping next time.

[email protected]

Review URL: https://codereview.chromium.org/291343002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@272362 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/BUILD.gn b/BUILD.gn
index 91641d7..6a9e94d 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -52,7 +52,7 @@
     "//third_party/libwebm",
     "//third_party/libwebp",
     "//third_party/ots",
-      "//third_party/protobuf:protobuf_lite",
+    "//third_party/protobuf:protobuf_lite",
     "//third_party/qcms",
     "//third_party/re2",
     "//third_party/smhasher:cityhash",
@@ -84,24 +84,18 @@
 
   if (is_android) {
     deps -= [
-      "//components/os_crypt",
       "//content/public/common",
-      "//crypto",
-      "//gpu/command_buffer/client",  # Needs Skia.
+      "//gpu/command_buffer/client",  # Needs some JNI stuff:
       "//gpu/command_buffer/service",
       "//net",
       "//third_party/libusb",
-      # Should work, but staging this landing for Android separately.
-      "//third_party/protobuf:protobuf_lite",
       #"//third_party/WebKit/Source/platform",
       "//third_party/WebKit/Source/wtf",  # TODO(brettw) re-enable for Android.
       "//tools/gn",
 
-      # This UI stuff is blocked on Skia.
-      "//ui/accessibility",
+      # ui_base doesn't work yet, and neither do things that depend on it.
       "//ui/base:ui_base",
       "//ui/events",
-      "//ui/gfx",
       "//ui/surface",
     ]
   }
diff --git a/crypto/BUILD.gn b/crypto/BUILD.gn
index 31d56c1..30784208 100644
--- a/crypto/BUILD.gn
+++ b/crypto/BUILD.gn
@@ -118,6 +118,10 @@
     ]
   }
 
+  if (is_android) {
+    deps += [ "//third_party/android_tools:cpu_features" ]
+  }
+
   if (use_openssl) {
     # Remove NSS files when using OpenSSL
     sources -= [
diff --git a/tools/gn/secondary/third_party/android_tools/BUILD.gn b/tools/gn/secondary/third_party/android_tools/BUILD.gn
index b5f6ebd..44a10d9 100644
--- a/tools/gn/secondary/third_party/android_tools/BUILD.gn
+++ b/tools/gn/secondary/third_party/android_tools/BUILD.gn
@@ -6,6 +6,8 @@
   include_dirs = [ "ndk/sources/android/cpufeatures" ]
 }
 
+# This is the GN version of
+# //build/android/cpufeatures.gypi:cpufeatures
 source_set("cpu_features") {
   sources = [ "ndk/sources/android/cpufeatures/cpu-features.c" ]
   direct_dependent_configs = [ ":cpu_features_include" ]