blob: d5a4df1a6c080bfa4b5e00a03b61707d186f8d24 [file] [log] [blame]
[email protected]83c09ff2012-08-02 18:04:491// 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]e7bee3992012-09-27 18:36:265#ifndef ANDROID_WEBVIEW_NATIVE_ANDROID_PROTOCOL_HANDLER_H_
6#define ANDROID_WEBVIEW_NATIVE_ANDROID_PROTOCOL_HANDLER_H_
[email protected]83c09ff2012-08-02 18:04:497
[email protected]e7bee3992012-09-27 18:36:268#include "base/android/jni_android.h"
[email protected]f53b4802012-12-20 17:04:239#include "base/memory/scoped_ptr.h"
[email protected]83c09ff2012-08-02 18:04:4910
[email protected]32f72e6f2012-11-01 13:53:1411namespace net {
12class URLRequestContext;
[email protected]3b90aab2014-05-30 17:56:1513class URLRequestInterceptor;
[email protected]32f72e6f2012-11-01 13:53:1414} // namespace net
15
[email protected]f81fa202012-10-25 23:32:2816namespace android_webview {
[email protected]32f72e6f2012-11-01 13:53:1417
[email protected]3b90aab2014-05-30 17:56:1518// These methods create interceptors for Android WebView-specific schemes:
[email protected]32f72e6f2012-11-01 13:53:1419//
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]3b90aab2014-05-30 17:56:1523scoped_ptr<net::URLRequestInterceptor> CreateContentSchemeRequestInterceptor();
[email protected]6c488002013-03-07 16:14:4724
[email protected]32f72e6f2012-11-01 13:53:1425// - "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]3b90aab2014-05-30 17:56:1529scoped_ptr<net::URLRequestInterceptor> CreateAssetFileRequestInterceptor();
[email protected]32f72e6f2012-11-01 13:53:1430
[email protected]e7bee3992012-09-27 18:36:2631bool RegisterAndroidProtocolHandler(JNIEnv* env);
[email protected]f53b4802012-12-20 17:04:2332
[email protected]f81fa202012-10-25 23:32:2833} // namespace android_webview
[email protected]e7bee3992012-09-27 18:36:2634
35#endif // ANDROID_WEBVIEW_NATIVE_ANDROID_PROTOCOL_HANDLER_H_