Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(208)

Side by Side Diff: android_webview/native/android_protocol_handler.h

Issue 12377051: [android_webview] Don't intercept resource and asset URLRequests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #include "base/memory/scoped_ptr.h"
10 #include "net/url_request/url_request_job_factory.h"
10 11
11 namespace net { 12 namespace net {
12 class URLRequestContext; 13 class URLRequestContext;
13 class URLRequestJobFactory;
14 } // namespace net 14 } // namespace net
15 15
16 namespace android_webview { 16 namespace android_webview {
17 class AwURLRequestJobFactory;
18 17
19 // This class adds support for Android WebView-specific protocol schemes: 18 // These method register support for Android WebView-specific protocol schemes:
20 // 19 //
21 // - "content:" scheme is used for accessing data from Android content 20 // - "content:" scheme is used for accessing data from Android content
22 // providers, see http://developer.android.com/guide/topics/providers/ 21 // providers, see http://developer.android.com/guide/topics/providers/
23 // content-provider-basics.html#ContentURIs 22 // content-provider-basics.html#ContentURIs
24 // 23 //
24 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
25 CreateContentSchemeProtocolHandler();
26
25 // - "file:" scheme extension for accessing application assets and resources 27 // - "file:" scheme extension for accessing application assets and resources
26 // (file:///android_asset/ and file:///android_res/), see 28 // (file:///android_asset/ and file:///android_res/), see
27 // http://developer.android.com/reference/android/webkit/ 29 // http://developer.android.com/reference/android/webkit/
28 // WebSettings.html#setAllowFileAccess(boolean) 30 // WebSettings.html#setAllowFileAccess(boolean)
29 scoped_ptr<net::URLRequestJobFactory> CreateAndroidRequestJobFactory( 31 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
30 scoped_ptr<AwURLRequestJobFactory> job_factory); 32 CreateAssetFileProtocolHandler();
31 33
32 bool RegisterAndroidProtocolHandler(JNIEnv* env); 34 bool RegisterAndroidProtocolHandler(JNIEnv* env);
33 35
34 } // namespace android_webview 36 } // namespace android_webview
35 37
36 #endif // ANDROID_WEBVIEW_NATIVE_ANDROID_PROTOCOL_HANDLER_H_ 38 #endif // ANDROID_WEBVIEW_NATIVE_ANDROID_PROTOCOL_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698