OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "android_webview/native/android_protocol_handler.h" | 5 #include "android_webview/native/android_protocol_handler.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "android_webview/browser/net/android_stream_reader_url_request_job.h" | 9 #include "android_webview/browser/net/android_stream_reader_url_request_job.h" |
10 #include "android_webview/browser/net/aw_url_request_job_factory.h" | 10 #include "android_webview/browser/net/aw_url_request_job_factory.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 #include "net/url_request/url_request_interceptor.h" | 25 #include "net/url_request/url_request_interceptor.h" |
26 #include "url/gurl.h" | 26 #include "url/gurl.h" |
27 #include "url/url_constants.h" | 27 #include "url/url_constants.h" |
28 | 28 |
29 using android_webview::AndroidStreamReaderURLRequestJob; | 29 using android_webview::AndroidStreamReaderURLRequestJob; |
30 using android_webview::InputStream; | 30 using android_webview::InputStream; |
31 using android_webview::InputStreamImpl; | 31 using android_webview::InputStreamImpl; |
32 using base::android::AttachCurrentThread; | 32 using base::android::AttachCurrentThread; |
33 using base::android::ClearException; | 33 using base::android::ClearException; |
34 using base::android::ConvertUTF8ToJavaString; | 34 using base::android::ConvertUTF8ToJavaString; |
| 35 using base::android::JavaParamRef; |
35 using base::android::ScopedJavaGlobalRef; | 36 using base::android::ScopedJavaGlobalRef; |
36 using base::android::ScopedJavaLocalRef; | 37 using base::android::ScopedJavaLocalRef; |
37 | 38 |
38 namespace { | 39 namespace { |
39 | 40 |
40 // Override resource context for reading resource and asset files. Used for | 41 // Override resource context for reading resource and asset files. Used for |
41 // testing. | 42 // testing. |
42 JavaObjectWeakGlobalRef* g_resource_context = NULL; | 43 JavaObjectWeakGlobalRef* g_resource_context = NULL; |
43 | 44 |
44 void ResetResourceContext(JavaObjectWeakGlobalRef* ref) { | 45 void ResetResourceContext(JavaObjectWeakGlobalRef* ref) { |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 return ConvertUTF8ToJavaString(env, android_webview::kAndroidAssetPath); | 293 return ConvertUTF8ToJavaString(env, android_webview::kAndroidAssetPath); |
293 } | 294 } |
294 | 295 |
295 static ScopedJavaLocalRef<jstring> GetAndroidResourcePath( | 296 static ScopedJavaLocalRef<jstring> GetAndroidResourcePath( |
296 JNIEnv* env, | 297 JNIEnv* env, |
297 const JavaParamRef<jclass>& /*clazz*/) { | 298 const JavaParamRef<jclass>& /*clazz*/) { |
298 return ConvertUTF8ToJavaString(env, android_webview::kAndroidResourcePath); | 299 return ConvertUTF8ToJavaString(env, android_webview::kAndroidResourcePath); |
299 } | 300 } |
300 | 301 |
301 } // namespace android_webview | 302 } // namespace android_webview |
OLD | NEW |