OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "net/test/embedded_test_server/android/embedded_test_server_android.h" | 5 #include "net/test/embedded_test_server/android/embedded_test_server_android.h" |
6 | 6 |
7 #include "base/android/jni_string.h" | 7 #include "base/android/jni_string.h" |
8 #include "base/android/scoped_java_ref.h" | 8 #include "base/android/scoped_java_ref.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
11 #include "base/test/test_support_android.h" | 11 #include "base/test/test_support_android.h" |
12 #include "base/trace_event/trace_event.h" | 12 #include "base/trace_event/trace_event.h" |
13 #include "net/test/jni/EmbeddedTestServerImpl_jni.h" | 13 #include "net/test/jni/EmbeddedTestServerImpl_jni.h" |
14 | 14 |
| 15 using base::android::JavaParamRef; |
| 16 |
15 namespace net { | 17 namespace net { |
16 namespace test_server { | 18 namespace test_server { |
17 | 19 |
18 EmbeddedTestServerAndroid::EmbeddedTestServerAndroid(JNIEnv* env, jobject jobj) | 20 EmbeddedTestServerAndroid::EmbeddedTestServerAndroid(JNIEnv* env, jobject jobj) |
19 : weak_java_server_(env, jobj), test_server_() { | 21 : weak_java_server_(env, jobj), test_server_() { |
20 Java_EmbeddedTestServerImpl_setNativePtr(env, jobj, | 22 Java_EmbeddedTestServerImpl_setNativePtr(env, jobj, |
21 reinterpret_cast<intptr_t>(this)); | 23 reinterpret_cast<intptr_t>(this)); |
22 } | 24 } |
23 | 25 |
24 EmbeddedTestServerAndroid::~EmbeddedTestServerAndroid() { | 26 EmbeddedTestServerAndroid::~EmbeddedTestServerAndroid() { |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 new EmbeddedTestServerAndroid(env, jobj); | 82 new EmbeddedTestServerAndroid(env, jobj); |
81 } | 83 } |
82 | 84 |
83 // static | 85 // static |
84 bool EmbeddedTestServerAndroid::RegisterEmbeddedTestServerAndroid(JNIEnv* env) { | 86 bool EmbeddedTestServerAndroid::RegisterEmbeddedTestServerAndroid(JNIEnv* env) { |
85 return RegisterNativesImpl(env); | 87 return RegisterNativesImpl(env); |
86 } | 88 } |
87 | 89 |
88 } // namespace test_server | 90 } // namespace test_server |
89 } // namespace net | 91 } // namespace net |
OLD | NEW |