GN: Fix Android component build

This change makes all libraries in the Android component build link
successfully (including fixing and enabling libchrome_shell). This also makes
all the libraries link in a component build for Linux, but without bot coverage
for that platform it'll surely regress.

This is almost entirely just fixing some missing/incorrect dependencies and
adding missing source files for Android.

Some targets were depending on an internal source_set/static_library when they
should have been (or already were) depending on the corresponding component. In
these cases, I added some visibility restrictions to those internal targets to
try to prevent those types of dependencies from coming back.

BUG=359249

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

Cr-Commit-Position: refs/heads/master@{#301386}
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index cf47b3c..f8e1a3b 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -135,7 +135,7 @@
     "//third_party/zlib:minizip",
     "//third_party/zlib:zip",
     "//ui/base",
-    "//ui/events",
+    "//ui/events:events_base",
     "//ui/gfx",
     "//ui/gfx/geometry",
     "//ui/message_center",
@@ -184,6 +184,7 @@
       "//content/app/resources",
       "//media",
       "//media/cast:net",
+      "//mojo/common",
       "//mojo/edk/system",
       "//mojo/environment:chromium",
       "//mojo/public/cpp/bindings",
@@ -308,7 +309,10 @@
       sources += rebase_path(gypi_values.chrome_browser_policy_desktop_sources,
                              ".", "//chrome")
     }
-    if (!is_android && !is_ios) {  # Non-mobile
+    if (is_android || is_ios) {
+      sources += rebase_path(gypi_values.chrome_browser_policy_mobile_sources,
+                             ".", "//chrome")
+    } else {
       deps += [
         "//chrome/browser/policy:path_parser",
       ]
@@ -492,7 +496,10 @@
     deps += [
       ":jni_headers",
       "//components/cdm/browser",
-      #"../components/components.gyp:web_contents_delegate_android",  TODO(GYP)
+      "//components/enhanced_bookmarks",
+      "//components/history/core/android",
+      "//components/web_contents_delegate_android",
+      "//third_party/android_opengl/etc1",
     ]
     deps -= [
       "//third_party/libaddressinput",