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

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

Issue 687433002: Remove mojo/shell and (most) service implementations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove mojo/gles2, disable mojo apps in component build 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 unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "base/android/base_jni_registrar.h"
6 #include "base/android/jni_android.h"
7 #include "base/android/jni_registrar.h"
8 #include "base/android/library_loader/library_loader_hooks.h"
9 #include "base/logging.h"
10 #include "mojo/services/native_viewport/platform_viewport_android.h"
11 #include "mojo/shell/android/mojo_main.h"
12 #include "net/android/net_jni_registrar.h"
13
14 namespace {
15
16 base::android::RegistrationMethod kMojoRegisteredMethods[] = {
17 { "MojoMain", mojo::RegisterMojoMain },
18 { "PlatformViewportAndroid",
19 mojo::PlatformViewportAndroid::Register },
20 };
21
22 bool RegisterMojoJni(JNIEnv* env) {
23 return RegisterNativeMethods(env, kMojoRegisteredMethods,
24 arraysize(kMojoRegisteredMethods));
25 }
26
27 } // namespace
28
29 // This is called by the VM when the shared library is first loaded.
30 JNI_EXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) {
31 base::android::InitVM(vm);
32 JNIEnv* env = base::android::AttachCurrentThread();
33
34 if (!base::android::RegisterLibraryLoaderEntryHook(env))
35 return -1;
36
37 if (!base::android::RegisterJni(env))
38 return -1;
39
40 if (!net::android::RegisterJni(env))
41 return -1;
42
43 if (!RegisterMojoJni(env))
44 return -1;
45
46 return JNI_VERSION_1_4;
47 }
OLDNEW
« no previous file with comments | « mojo/shell/android/apk/src/org/chromium/mojo_shell_apk/MojoShellApplication.java ('k') | mojo/shell/android/mojo_main.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698