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

Side by Side Diff: android_webview/browser/intercepted_request_data.h

Issue 284123004: [android_webview] Add more params to request intercepting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix accidentally broken test Created 6 years, 6 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
(Empty)
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
5 #ifndef ANDROID_WEBVIEW_BROWSER_INTERCEPTED_REQUEST_DATA_H_
6 #define ANDROID_WEBVIEW_BROWSER_INTERCEPTED_REQUEST_DATA_H_
7
8 #include <string>
9
10 #include "base/android/jni_android.h"
11 #include "base/memory/scoped_ptr.h"
12
13 namespace net {
14 class URLRequest;
15 class URLRequestJob;
16 class NetworkDelegate;
17 }
18
19 namespace android_webview {
20
21 class InputStream;
22
23 // This class represents the Java-side data that is to be used to complete a
24 // particular URLRequest.
25 class InterceptedRequestData {
26 public:
27 virtual ~InterceptedRequestData() {}
28
29 virtual scoped_ptr<InputStream> GetInputStream(JNIEnv* env) const = 0;
30 virtual bool GetMimeType(JNIEnv* env, std::string* mime_type) const = 0;
31 virtual bool GetCharset(JNIEnv* env, std::string* charset) const = 0;
32
33 // This creates a URLRequestJob for the |request| wich will read data from
34 // the |intercepted_request_data| structure (instead of going to the network
35 // or to the cache).
36 // The newly created job takes ownership of |intercepted_request_data|.
37 static net::URLRequestJob* CreateJobFor(
38 scoped_ptr<InterceptedRequestData> intercepted_request_data,
39 net::URLRequest* request,
40 net::NetworkDelegate* network_delegate);
41
42 protected:
43 InterceptedRequestData() {}
44
45 private:
46 DISALLOW_COPY_AND_ASSIGN(InterceptedRequestData);
47 };
48
49 } // namespace android_webview
50
51 #endif // ANDROID_WEBVIEW_BROWSER_INTERCEPTED_REQUEST_DATA_H_
OLDNEW
« no previous file with comments | « android_webview/browser/aw_web_resource_response.cc ('k') | android_webview/browser/intercepted_request_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698