| Index: mojo/services/html_viewer/android/android_hooks.cc
|
| diff --git a/mojo/services/network/android_hooks.cc b/mojo/services/html_viewer/android/android_hooks.cc
|
| similarity index 84%
|
| copy from mojo/services/network/android_hooks.cc
|
| copy to mojo/services/html_viewer/android/android_hooks.cc
|
| index e8224023bca84f0710c4e5c2889df288ab0d8857..a1a29d204ed6e3c6575461017d61785f9997846d 100644
|
| --- a/mojo/services/network/android_hooks.cc
|
| +++ b/mojo/services/html_viewer/android/android_hooks.cc
|
| @@ -1,4 +1,4 @@
|
| -// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// 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.
|
|
|
| @@ -8,23 +8,24 @@
|
| #include "base/android/jni_android.h"
|
| #include "base/android/library_loader/library_loader_hooks.h"
|
| #include "base/bind.h"
|
| -#include "net/android/net_jni_registrar.h"
|
| +#include "mojo/services/html_viewer/jni/Main_jni.h"
|
|
|
| namespace {
|
| bool RegisterJNI(JNIEnv* env) {
|
| - return net::android::RegisterJni(env);
|
| + return true;
|
| }
|
|
|
| bool Init() {
|
| + Java_Main_init(base::android::AttachCurrentThread());
|
| 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));
|
|
|