[email protected] | 83c09ff | 2012-08-02 18:04:49 | [diff] [blame] | 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 | ||||
3 | // found in the LICENSE file. | ||||
4 | |||||
[email protected] | e7bee399 | 2012-09-27 18:36:26 | [diff] [blame] | 5 | #ifndef ANDROID_WEBVIEW_NATIVE_ANDROID_PROTOCOL_HANDLER_H_ |
6 | #define ANDROID_WEBVIEW_NATIVE_ANDROID_PROTOCOL_HANDLER_H_ | ||||
[email protected] | 83c09ff | 2012-08-02 18:04:49 | [diff] [blame] | 7 | |
[email protected] | e7bee399 | 2012-09-27 18:36:26 | [diff] [blame] | 8 | #include "base/android/jni_android.h" |
[email protected] | f53b480 | 2012-12-20 17:04:23 | [diff] [blame] | 9 | #include "base/memory/scoped_ptr.h" |
[email protected] | 83c09ff | 2012-08-02 18:04:49 | [diff] [blame] | 10 | |
[email protected] | 32f72e6f | 2012-11-01 13:53:14 | [diff] [blame] | 11 | namespace net { |
12 | class URLRequestContext; | ||||
[email protected] | 3b90aab | 2014-05-30 17:56:15 | [diff] [blame] | 13 | class URLRequestInterceptor; |
[email protected] | 32f72e6f | 2012-11-01 13:53:14 | [diff] [blame] | 14 | } // namespace net |
15 | |||||
[email protected] | f81fa20 | 2012-10-25 23:32:28 | [diff] [blame] | 16 | namespace android_webview { |
[email protected] | 32f72e6f | 2012-11-01 13:53:14 | [diff] [blame] | 17 | |
[email protected] | 3b90aab | 2014-05-30 17:56:15 | [diff] [blame] | 18 | // These methods create interceptors for Android WebView-specific schemes: |
[email protected] | 32f72e6f | 2012-11-01 13:53:14 | [diff] [blame] | 19 | // |
20 | // - "content:" scheme is used for accessing data from Android content | ||||
21 | // providers, see http://developer.android.com/guide/topics/providers/ | ||||
22 | // content-provider-basics.html#ContentURIs | ||||
[email protected] | 3b90aab | 2014-05-30 17:56:15 | [diff] [blame] | 23 | scoped_ptr<net::URLRequestInterceptor> CreateContentSchemeRequestInterceptor(); |
[email protected] | 6c48800 | 2013-03-07 16:14:47 | [diff] [blame] | 24 | |
[email protected] | 32f72e6f | 2012-11-01 13:53:14 | [diff] [blame] | 25 | // - "file:" scheme extension for accessing application assets and resources |
26 | // (file:///android_asset/ and file:///android_res/), see | ||||
27 | // http://developer.android.com/reference/android/webkit/ | ||||
28 | // WebSettings.html#setAllowFileAccess(boolean) | ||||
[email protected] | 3b90aab | 2014-05-30 17:56:15 | [diff] [blame] | 29 | scoped_ptr<net::URLRequestInterceptor> CreateAssetFileRequestInterceptor(); |
[email protected] | 32f72e6f | 2012-11-01 13:53:14 | [diff] [blame] | 30 | |
[email protected] | e7bee399 | 2012-09-27 18:36:26 | [diff] [blame] | 31 | bool RegisterAndroidProtocolHandler(JNIEnv* env); |
[email protected] | f53b480 | 2012-12-20 17:04:23 | [diff] [blame] | 32 | |
[email protected] | f81fa20 | 2012-10-25 23:32:28 | [diff] [blame] | 33 | } // namespace android_webview |
[email protected] | e7bee399 | 2012-09-27 18:36:26 | [diff] [blame] | 34 | |
35 | #endif // ANDROID_WEBVIEW_NATIVE_ANDROID_PROTOCOL_HANDLER_H_ |