Chromium Code Reviews| 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 #ifndef NET_TEST_EMBEDDED_TEST_SERVER_ANDROID_EMBEDDED_TEST_SERVER_ANDROID_H_ | 5 #ifndef NET_TEST_EMBEDDED_TEST_SERVER_ANDROID_EMBEDDED_TEST_SERVER_ANDROID_H_ |
| 6 #define NET_TEST_EMBEDDED_TEST_SERVER_ANDROID_EMBEDDED_TEST_SERVER_ANDROID_H_ | 6 #define NET_TEST_EMBEDDED_TEST_SERVER_ANDROID_EMBEDDED_TEST_SERVER_ANDROID_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 | 9 |
| 10 #include "base/android/jni_weak_ref.h" | 10 #include "base/android/jni_weak_ref.h" |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 35 base::android::ScopedJavaLocalRef<jstring> GetURL( | 35 base::android::ScopedJavaLocalRef<jstring> GetURL( |
| 36 JNIEnv* jenv, | 36 JNIEnv* jenv, |
| 37 const base::android::JavaParamRef<jobject>& jobj, | 37 const base::android::JavaParamRef<jobject>& jobj, |
| 38 const base::android::JavaParamRef<jstring>& jrelative_url) const; | 38 const base::android::JavaParamRef<jstring>& jrelative_url) const; |
| 39 | 39 |
| 40 void AddDefaultHandlers( | 40 void AddDefaultHandlers( |
| 41 JNIEnv* jenv, | 41 JNIEnv* jenv, |
| 42 const base::android::JavaParamRef<jobject>& jobj, | 42 const base::android::JavaParamRef<jobject>& jobj, |
| 43 const base::android::JavaParamRef<jstring>& jdirectory_path); | 43 const base::android::JavaParamRef<jstring>& jdirectory_path); |
| 44 | 44 |
| 45 base::android::ScopedJavaLocalRef<jlongArray> GetCustomHandlers( | |
|
shenghuazhang
2017/03/04 00:22:21
Have to add GetCustomHandlers and RegisterRequestH
| |
| 46 JNIEnv* env, | |
| 47 const base::android::JavaParamRef<jobject>& jobj); | |
| 48 | |
| 49 void RegisterRequestHandler(JNIEnv* jenv, | |
| 50 const base::android::JavaParamRef<jobject>& jobj, | |
| 51 jlong handler); | |
| 52 | |
| 45 void ServeFilesFromDirectory( | 53 void ServeFilesFromDirectory( |
| 46 JNIEnv* env, | 54 JNIEnv* env, |
| 47 const base::android::JavaParamRef<jobject>& jobj, | 55 const base::android::JavaParamRef<jobject>& jobj, |
| 48 const base::android::JavaParamRef<jstring>& jdirectory_path); | 56 const base::android::JavaParamRef<jstring>& jdirectory_path); |
| 49 | 57 |
| 50 static bool RegisterEmbeddedTestServerAndroid(JNIEnv* env); | 58 static bool RegisterEmbeddedTestServerAndroid(JNIEnv* env); |
| 51 | 59 |
| 52 private: | 60 private: |
| 53 JavaObjectWeakGlobalRef weak_java_server_; | 61 JavaObjectWeakGlobalRef weak_java_server_; |
| 54 | 62 |
| 55 EmbeddedTestServer test_server_; | 63 EmbeddedTestServer test_server_; |
| 56 | 64 |
| 57 DISALLOW_COPY_AND_ASSIGN(EmbeddedTestServerAndroid); | 65 DISALLOW_COPY_AND_ASSIGN(EmbeddedTestServerAndroid); |
| 58 }; | 66 }; |
| 59 | 67 |
| 60 } // namespace test_server | 68 } // namespace test_server |
| 61 } // namespace net | 69 } // namespace net |
| 62 | 70 |
| 63 #endif // NET_TEST_EMBEDDED_TEST_SERVER_ANDROID_EMBEDDED_TEST_SERVER_ANDROID_H_ | 71 #endif // NET_TEST_EMBEDDED_TEST_SERVER_ANDROID_EMBEDDED_TEST_SERVER_ANDROID_H_ |
| OLD | NEW |