Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 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 "android_webview/test/embeddedtestserver/aw_test_jni_onload.h" | |
| 6 | |
| 7 #include "android_webview/test/embeddedtestserver/custom_handlers.h" | |
| 8 #include "base/android/base_jni_onload.h" | |
| 9 #include "base/android/base_jni_registrar.h" | |
| 10 #include "base/android/jni_android.h" | |
| 11 #include "base/bind.h" | |
| 12 #include "base/trace_event/trace_event.h" | |
| 13 #include "net/test/embedded_test_server/android/embedded_test_server_android.h" | |
| 14 | |
| 15 namespace android_webview { | |
| 16 namespace test { | |
| 17 | |
| 18 namespace { | |
| 19 | |
| 20 bool RegisterJNI(JNIEnv* env) { | |
| 21 return net::test_server::EmbeddedTestServerAndroid:: | |
|
jbudorick
2017/03/13 23:32:54
hmm, can we have the net code handle this and just
shenghuazhang
2017/03/17 01:07:15
Done.
| |
| 22 RegisterEmbeddedTestServerAndroid(env); | |
| 23 } | |
| 24 | |
| 25 bool RegisterHandlersJNI(JNIEnv* env) { | |
|
jbudorick
2017/03/13 23:32:54
w/ the change above, we could rename this to just
shenghuazhang
2017/03/17 01:07:15
Done.
| |
| 26 TRACE_EVENT0("native", "android_webview::test::RegisterHandlersJNI"); | |
| 27 return android_webview::test::RegisterCustomHandlers(env); | |
| 28 } | |
| 29 | |
| 30 } // namesapce | |
| 31 | |
| 32 bool OnJNIOnLoadRegisterJNI(JNIEnv* env) { | |
| 33 return base::android::OnJNIOnLoadRegisterJNI(env) && | |
| 34 base::android::RegisterJni(env) && RegisterHandlersJNI(env) && | |
| 35 RegisterJNI(env); | |
| 36 } | |
| 37 | |
| 38 bool OnJNIOnLoadInit() { | |
| 39 return base::android::OnJNIOnLoadInit(); | |
| 40 } | |
| 41 | |
| 42 } // namespace test | |
| 43 } // namespace android_webview | |
| OLD | NEW |