Index: mojo/services/html_viewer/android/android_hooks.cc |
diff --git a/mojo/services/html_viewer/android/android_hooks.cc b/mojo/services/html_viewer/android/android_hooks.cc |
deleted file mode 100644 |
index 428dcc63eeaca3a02e391f579724345c32e71b48..0000000000000000000000000000000000000000 |
--- a/mojo/services/html_viewer/android/android_hooks.cc |
+++ /dev/null |
@@ -1,50 +0,0 @@ |
-// Copyright 2015 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 <vector> |
- |
-#include "base/android/base_jni_onload.h" |
-#include "base/android/jni_android.h" |
-#include "base/android/library_loader/library_loader_hooks.h" |
-#include "base/bind.h" |
-#include "mojo/services/html_viewer/jni/Main_jni.h" |
- |
-namespace { |
-bool RegisterJNI(JNIEnv* env) { |
- return true; |
-} |
- |
-bool Init() { |
- Java_Main_init(base::android::AttachCurrentThread(), |
- base::android::GetApplicationContext()); |
- return true; |
-} |
-} // namespace |
- |
-// This is called by the VM when the shared library is first loaded. |
-JNI_EXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) { |
- std::vector<base::android::RegisterCallback> register_callbacks; |
- register_callbacks.push_back(base::Bind(&RegisterJNI)); |
- register_callbacks.push_back(base::Bind(&RegisterNativesImpl)); |
- |
- std::vector<base::android::InitCallback> init_callbacks; |
- init_callbacks.push_back(base::Bind(&Init)); |
- |
- if (!base::android::OnJNIOnLoadRegisterJNI(vm, register_callbacks) || |
- !base::android::OnJNIOnLoadInit(init_callbacks)) { |
- return -1; |
- } |
- |
- // There cannot be two AtExitManagers at the same time. Remove the one from |
- // LibraryLoader as ApplicationRunnerChromium also uses one. |
- base::android::LibraryLoaderExitHook(); |
- |
- return JNI_VERSION_1_4; |
-} |
- |
-extern "C" JNI_EXPORT void InitApplicationContext( |
- const base::android::JavaRef<jobject>& context) { |
- JNIEnv* env = base::android::AttachCurrentThread(); |
- base::android::InitApplicationContext(env, context); |
-} |