Auto-load native libraries of a module (reland)

This gets rid of the whitelist in Module.java. Going forward DFM authors
simply have to specify native_deps in the module_desc and the native
library will be automatically loaded when first accessing the module
(when using the autogenerated module class).

See go/native-dfm-load-v2 for more context and details.

This is a reland of 06c7b1cdbba6a581ef5f0fbd2712a9d0799d6acc No changes
have been made. 06c7b1cdbba6a581ef5f0fbd2712a9d0799d6acc was reverted
due to the revert of a9dcd64a13a3b0c0522f6fbd26e079e4874869b7 and that
CL has been fixed in c9901c6af04f9ee9e176e4a4b8c130c1998b8a58.

TBR: [email protected],[email protected]
Bug: 870055
Change-Id: Ib7939f43f2e3ca758c8ab039f91d6f78b6d84f22
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1891434
Reviewed-by: Tibor Goldschwendt <[email protected]>
Reviewed-by: Christopher Grant <[email protected]>
Cr-Commit-Position: refs/heads/master@{#711460}
diff --git a/chrome/browser/vr/jni_onload.cc b/chrome/browser/vr/jni_onload.cc
new file mode 100644
index 0000000..817645352
--- /dev/null
+++ b/chrome/browser/vr/jni_onload.cc
@@ -0,0 +1,13 @@
+// Copyright 2019 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.
+
+#include "base/android/jni_generator/jni_generator_helper.h"
+
+// This method is required by the module loading backend. And it is supposed to
+// register VR's native JNI methods. However, since VR's Android-specific native
+// code still lives in the base module, VR's JNI registration is invoked
+// manually. Therefore, this function does nothing.
+JNI_GENERATOR_EXPORT bool JNI_OnLoad_vr(JNIEnv* env) {
+  return true;
+}