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

Side by Side Diff: mojo/android/javatests/init_library.cc

Issue 1350023003: Add a Mojo EDK for Chrome that uses one OS pipe per message pipe. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_onload.h" 5 #include "base/android/base_jni_onload.h"
6 #include "base/android/base_jni_registrar.h" 6 #include "base/android/base_jni_registrar.h"
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_registrar.h" 8 #include "base/android/jni_registrar.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "mojo/android/javatests/mojo_test_case.h" 10 #include "mojo/android/javatests/mojo_test_case.h"
11 #include "mojo/android/javatests/validation_test_util.h" 11 #include "mojo/android/javatests/validation_test_util.h"
12 #include "mojo/android/system/core_impl.h" 12 #include "mojo/android/system/core_impl.h"
13
14 #if defined(USE_CHROME_EDK)
13 #include "mojo/edk/embedder/embedder.h" 15 #include "mojo/edk/embedder/embedder.h"
14 #include "mojo/edk/embedder/simple_platform_support.h" 16 #include "mojo/edk/embedder/simple_platform_support.h"
17 #else
18 #include "third_party/mojo/src/mojo/edk/embedder/embedder.h"
19 #include "third_party/mojo/src/mojo/edk/embedder/simple_platform_support.h"
20 #endif
15 21
16 namespace { 22 namespace {
17 23
18 base::android::RegistrationMethod kMojoRegisteredMethods[] = { 24 base::android::RegistrationMethod kMojoRegisteredMethods[] = {
19 { "CoreImpl", mojo::android::RegisterCoreImpl }, 25 { "CoreImpl", mojo::android::RegisterCoreImpl },
20 { "MojoTestCase", mojo::android::RegisterMojoTestCase }, 26 { "MojoTestCase", mojo::android::RegisterMojoTestCase },
21 { "ValidationTestUtil", mojo::android::RegisterValidationTestUtil }, 27 { "ValidationTestUtil", mojo::android::RegisterValidationTestUtil },
22 }; 28 };
23 29
24 bool RegisterJNI(JNIEnv* env) { 30 bool RegisterJNI(JNIEnv* env) {
(...skipping 14 matching lines...) Expand all
39 std::vector<base::android::RegisterCallback> register_callbacks; 45 std::vector<base::android::RegisterCallback> register_callbacks;
40 register_callbacks.push_back(base::Bind(&RegisterJNI)); 46 register_callbacks.push_back(base::Bind(&RegisterJNI));
41 std::vector<base::android::InitCallback> init_callbacks; 47 std::vector<base::android::InitCallback> init_callbacks;
42 init_callbacks.push_back(base::Bind(&Init)); 48 init_callbacks.push_back(base::Bind(&Init));
43 if (!base::android::OnJNIOnLoadRegisterJNI(vm, register_callbacks) || 49 if (!base::android::OnJNIOnLoadRegisterJNI(vm, register_callbacks) ||
44 !base::android::OnJNIOnLoadInit(init_callbacks)) 50 !base::android::OnJNIOnLoadInit(init_callbacks))
45 return -1; 51 return -1;
46 52
47 return JNI_VERSION_1_4; 53 return JNI_VERSION_1_4;
48 } 54 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698