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

Unified Diff: components/devtools_bridge/test/android/javatests/jni/jni_onload.cc

Issue 704613003: Beginning implementation of SessionDependencyFactory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed dependency on libjingle Created 6 years, 1 month 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
« no previous file with comments | « components/devtools_bridge/android/session_dependency_factory_native.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/devtools_bridge/test/android/javatests/jni/jni_onload.cc
diff --git a/components/devtools_bridge/test/android/javatests/jni/jni_onload.cc b/components/devtools_bridge/test/android/javatests/jni/jni_onload.cc
new file mode 100644
index 0000000000000000000000000000000000000000..36dcdc8cc77c68bfe184539aee36a6ad866f5719
--- /dev/null
+++ b/components/devtools_bridge/test/android/javatests/jni/jni_onload.cc
@@ -0,0 +1,24 @@
+// Copyright 2014 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/base_jni_registrar.h"
+#include "base/android/jni_android.h"
+#include "base/android/library_loader/library_loader_hooks.h"
+#include "components/devtools_bridge/android/session_dependency_factory_native.h"
+
+using namespace devtools_bridge::android;
+
+JNI_EXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) {
+ base::android::InitVM(vm);
+ JNIEnv* env = base::android::AttachCurrentThread();
+ if (!base::android::RegisterLibraryLoaderEntryHook(env)) {
+ return -1;
+ }
+ if (!base::android::RegisterJni(env)) {
+ return -1;
+ }
+
+ SessionDependencyFactoryNative::RegisterNatives(env);
+ return JNI_VERSION_1_4;
+}
« no previous file with comments | « components/devtools_bridge/android/session_dependency_factory_native.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698