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

Side by Side Diff: chrome/browser/android/android_protocol_adapter.h

Issue 10880025: [Android] Fix handling of asset files loading. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments addressed Created 8 years, 4 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 CHROME_BROWSER_ANDROID_ANDROID_PROTOCOL_ADAPTER_H_ 5 #ifndef CHROME_BROWSER_ANDROID_ANDROID_PROTOCOL_ADAPTER_H_
6 #define CHROME_BROWSER_ANDROID_ANDROID_PROTOCOL_ADAPTER_H_ 6 #define CHROME_BROWSER_ANDROID_ANDROID_PROTOCOL_ADAPTER_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include "net/url_request/url_request.h" 10 #include "net/url_request/url_request.h"
11 11
12 namespace net {
13
14 class URLRequestContextGetter;
15
16 }
17
18 // This class adds support for Android WebView-specific protocol schemes:
19 //
20 // - "content" scheme is used for accessing data from Android content
joth 2012/08/24 17:28:28 Thanks, great docs. nit: "content:" scheme. (ai
mnaganov (inactive) 2012/08/24 18:17:22 OK. But, technically, the colon isn't a part of th
21 // providers, see http://developer.android.com/guide/topics/providers/
22 // content-provider-basics.html#ContentURIs
23 //
24 // - "file" scheme extension for accessing application assets and resources,
joth 2012/08/24 17:28:28 ditto, android_assets and android_resources. (righ
mnaganov (inactive) 2012/08/24 18:17:22 Done.
25 // see http://developer.android.com/reference/android/webkit/
26 // WebSettings.html#setAllowFileAccess(boolean)
27 //
12 class AndroidProtocolAdapter { 28 class AndroidProtocolAdapter {
13 public: 29 public:
14 static net::URLRequest::ProtocolFactory Factory; 30 static net::URLRequest::ProtocolFactory Factory;
15 31
16 // Register the protocol factories for all supported Android protocol 32 // Register the protocol factories for all supported Android protocol
17 // schemes. 33 // schemes.
18 static bool RegisterProtocols(JNIEnv* env); 34 static void RegisterProtocols(
35 JNIEnv* env, net::URLRequestContextGetter* context);
19 36
20 private: 37 private:
21 DISALLOW_IMPLICIT_CONSTRUCTORS(AndroidProtocolAdapter); 38 DISALLOW_IMPLICIT_CONSTRUCTORS(AndroidProtocolAdapter);
22 }; 39 };
23 40
24 #endif // CHROME_BROWSER_ANDROID_ANDROID_PROTOCOL_ADAPTER_H_ 41 #endif // CHROME_BROWSER_ANDROID_ANDROID_PROTOCOL_ADAPTER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/android/android_protocol_adapter.cc » ('j') | chrome/browser/android/android_protocol_adapter.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698