Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(121)

Unified Diff: mojo/services/html_viewer/android/android_hooks.cc

Issue 1002033004: Gets packaging of html_viewer for android working (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..1a0f7ce2da9ef0a9e47d2a0fa3e6bed0a9aaf65e 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,11 +8,11 @@
#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() {
@@ -20,11 +20,11 @@ bool Init() {
}
} // 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));
@@ -38,6 +38,8 @@ JNI_EXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) {
// LibraryLoader as ApplicationRunnerChromium also uses one.
base::android::LibraryLoaderExitHook();
+ Java_Main_init(base::android::AttachCurrentThread());
qsr 2015/03/13 16:53:12 The intention of those utility functions is for th
sky 2015/03/13 22:12:50 Done.
+
return JNI_VERSION_1_4;
}

Powered by Google App Engine
This is Rietveld 408576698