Load the default favicon as a native image, rather than as a Skia image.
[chromium-blink-merge.git] / mojo / android / javatests / init_library.cc
blob28cee79443ad28f27d0eed520f841ede2e633b3f
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "base/android/base_jni_registrar.h"
6 #include "base/android/jni_android.h"
7 #include "base/android/jni_registrar.h"
8 #include "base/android/library_loader/library_loader_hooks.h"
9 #include "mojo/android/javatests/mojo_test_case.h"
10 #include "mojo/android/system/core_impl.h"
12 namespace {
14 base::android::RegistrationMethod kMojoRegisteredMethods[] = {
15 { "CoreImpl", mojo::android::RegisterCoreImpl },
16 { "MojoTestCase", mojo::android::RegisterMojoTestCase },
19 bool RegisterMojoJni(JNIEnv* env) {
20 return RegisterNativeMethods(env, kMojoRegisteredMethods,
21 arraysize(kMojoRegisteredMethods));
24 } // namespace
26 JNI_EXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) {
27 base::android::InitVM(vm);
28 JNIEnv* env = base::android::AttachCurrentThread();
30 if (!base::android::RegisterLibraryLoaderEntryHook(env))
31 return -1;
33 if (!base::android::RegisterJni(env))
34 return -1;
36 if (!RegisterMojoJni(env))
37 return -1;
39 return JNI_VERSION_1_4;