Revert of Blink roll 169451:169474 (https://codereview.chromium.org/203983002/)
[chromium-blink-merge.git] / android_webview / native / android_protocol_handler.h
blob82266b8663c5b6ea531626daf8e09ff81950bc91
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.
5 #ifndef ANDROID_WEBVIEW_NATIVE_ANDROID_PROTOCOL_HANDLER_H_
6 #define ANDROID_WEBVIEW_NATIVE_ANDROID_PROTOCOL_HANDLER_H_
8 #include "base/android/jni_android.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "net/url_request/url_request_job_factory.h"
12 namespace net {
13 class URLRequestContext;
14 } // namespace net
16 namespace android_webview {
18 // These method register support for Android WebView-specific protocol schemes:
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
24 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
25 CreateContentSchemeProtocolHandler();
27 // - "file:" scheme extension for accessing application assets and resources
28 // (file:///android_asset/ and file:///android_res/), see
29 // http://developer.android.com/reference/android/webkit/
30 // WebSettings.html#setAllowFileAccess(boolean)
31 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
32 CreateAssetFileProtocolHandler();
34 bool RegisterAndroidProtocolHandler(JNIEnv* env);
36 } // namespace android_webview
38 #endif // ANDROID_WEBVIEW_NATIVE_ANDROID_PROTOCOL_HANDLER_H_