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

Side by Side Diff: shell/android/library_loader.cc

Issue 782013002: Android: decouple mojo shell from the network service. (Closed) Base URL: https://github.com/domokit/mojo.git@build-rule-for-the-network-service
Patch Set: Rebase. Created 6 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/android/base_jni_registrar.h" 5 #include "base/android/base_jni_registrar.h"
6 #include "base/android/jni_android.h" 6 #include "base/android/jni_android.h"
7 #include "base/android/jni_registrar.h" 7 #include "base/android/jni_registrar.h"
8 #include "base/android/library_loader/library_loader_hooks.h" 8 #include "base/android/library_loader/library_loader_hooks.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "net/android/net_jni_registrar.h"
11 #include "services/native_viewport/platform_viewport_android.h" 10 #include "services/native_viewport/platform_viewport_android.h"
12 #include "shell/android/android_handler.h" 11 #include "shell/android/android_handler.h"
13 #include "shell/android/mojo_main.h" 12 #include "shell/android/mojo_main.h"
14 13
15 namespace { 14 namespace {
16 15
17 base::android::RegistrationMethod kMojoRegisteredMethods[] = { 16 base::android::RegistrationMethod kMojoRegisteredMethods[] = {
18 {"AndroidHandler", mojo::RegisterAndroidHandlerJni}, 17 {"AndroidHandler", mojo::RegisterAndroidHandlerJni},
19 {"MojoMain", mojo::RegisterMojoMain}, 18 {"MojoMain", mojo::RegisterMojoMain},
20 {"PlatformViewportAndroid", mojo::PlatformViewportAndroid::Register}, 19 {"PlatformViewportAndroid", mojo::PlatformViewportAndroid::Register},
(...skipping 10 matching lines...) Expand all
31 JNI_EXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) { 30 JNI_EXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) {
32 base::android::InitVM(vm); 31 base::android::InitVM(vm);
33 JNIEnv* env = base::android::AttachCurrentThread(); 32 JNIEnv* env = base::android::AttachCurrentThread();
34 33
35 if (!base::android::RegisterLibraryLoaderEntryHook(env)) 34 if (!base::android::RegisterLibraryLoaderEntryHook(env))
36 return -1; 35 return -1;
37 36
38 if (!base::android::RegisterJni(env)) 37 if (!base::android::RegisterJni(env))
39 return -1; 38 return -1;
40 39
41 if (!net::android::RegisterJni(env))
42 return -1;
43
44 if (!RegisterMojoJni(env)) 40 if (!RegisterMojoJni(env))
45 return -1; 41 return -1;
46 42
47 if (!mojo::RegisterAndroidHandlerJni(env)) 43 if (!mojo::RegisterAndroidHandlerJni(env))
48 return -1; 44 return -1;
49 45
50 return JNI_VERSION_1_4; 46 return JNI_VERSION_1_4;
51 } 47 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698