| 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 #ifndef ANDROID_WEBVIEW_NATIVE_ANDROID_PROTOCOL_HANDLER_H_ | 5 #ifndef ANDROID_WEBVIEW_NATIVE_ANDROID_PROTOCOL_HANDLER_H_ |
| 6 #define ANDROID_WEBVIEW_NATIVE_ANDROID_PROTOCOL_HANDLER_H_ | 6 #define ANDROID_WEBVIEW_NATIVE_ANDROID_PROTOCOL_HANDLER_H_ |
| 7 | 7 |
| 8 #include "base/android/jni_android.h" | 8 #include "base/android/jni_android.h" |
| 9 #include "base/memory/scoped_ptr.h" |
| 9 | 10 |
| 10 namespace net { | 11 namespace net { |
| 11 class URLRequestContext; | 12 class URLRequestContext; |
| 13 class URLRequestJobFactory; |
| 12 } // namespace net | 14 } // namespace net |
| 13 | 15 |
| 14 namespace android_webview { | 16 namespace android_webview { |
| 15 class AwURLRequestJobFactory; | 17 class AwURLRequestJobFactory; |
| 16 | 18 |
| 17 // This class adds support for Android WebView-specific protocol schemes: | 19 // This class adds support for Android WebView-specific protocol schemes: |
| 18 // | 20 // |
| 19 // - "content:" scheme is used for accessing data from Android content | 21 // - "content:" scheme is used for accessing data from Android content |
| 20 // providers, see http://developer.android.com/guide/topics/providers/ | 22 // providers, see http://developer.android.com/guide/topics/providers/ |
| 21 // content-provider-basics.html#ContentURIs | 23 // content-provider-basics.html#ContentURIs |
| 22 // | 24 // |
| 23 // - "file:" scheme extension for accessing application assets and resources | 25 // - "file:" scheme extension for accessing application assets and resources |
| 24 // (file:///android_asset/ and file:///android_res/), see | 26 // (file:///android_asset/ and file:///android_res/), see |
| 25 // http://developer.android.com/reference/android/webkit/ | 27 // http://developer.android.com/reference/android/webkit/ |
| 26 // WebSettings.html#setAllowFileAccess(boolean) | 28 // WebSettings.html#setAllowFileAccess(boolean) |
| 27 void RegisterAndroidProtocolsOnIOThread( | 29 scoped_ptr<net::URLRequestJobFactory> CreateAndroidRequestJobFactory( |
| 28 net::URLRequestContext* context, | 30 scoped_ptr<AwURLRequestJobFactory> job_factory); |
| 29 AwURLRequestJobFactory* job_factory); | |
| 30 | 31 |
| 31 bool RegisterAndroidProtocolHandler(JNIEnv* env); | 32 bool RegisterAndroidProtocolHandler(JNIEnv* env); |
| 33 |
| 32 } // namespace android_webview | 34 } // namespace android_webview |
| 33 | 35 |
| 34 #endif // ANDROID_WEBVIEW_NATIVE_ANDROID_PROTOCOL_HANDLER_H_ | 36 #endif // ANDROID_WEBVIEW_NATIVE_ANDROID_PROTOCOL_HANDLER_H_ |
| OLD | NEW |