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

Side by Side Diff: android_webview/native/aw_web_resource_response_impl.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
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_INTERCEPTED_REQUEST_DATA_IMPL_H_ 5 #ifndef ANDROID_WEBVIEW_NATIVE_INTERCEPTED_REQUEST_DATA_IMPL_H_
6 #define ANDROID_WEBVIEW_NATIVE_INTERCEPTED_REQUEST_DATA_IMPL_H_ 6 #define ANDROID_WEBVIEW_NATIVE_INTERCEPTED_REQUEST_DATA_IMPL_H_
7 7
8 #include "android_webview/browser/intercepted_request_data.h" 8 #include "android_webview/browser/aw_web_resource_response.h"
9 #include "base/android/scoped_java_ref.h" 9 #include "base/android/scoped_java_ref.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 12
13 namespace net {
14 class HttpResponseHeaders;
15 }
16
13 namespace android_webview { 17 namespace android_webview {
14 18
15 class InputStream; 19 class InputStream;
16 20
17 class InterceptedRequestDataImpl : public InterceptedRequestData { 21 class AwWebResourceResponseImpl : public AwWebResourceResponse {
18 public: 22 public:
19 // It is expected that |obj| is an instance of the Java-side 23 // It is expected that |obj| is an instance of the Java-side
20 // org.chromium.android_webview.InterceptedRequestData class. 24 // org.chromium.android_webview.AwWebResourceResponse class.
21 InterceptedRequestDataImpl(const base::android::JavaRef<jobject>& obj); 25 AwWebResourceResponseImpl(const base::android::JavaRef<jobject>& obj);
22 virtual ~InterceptedRequestDataImpl(); 26 virtual ~AwWebResourceResponseImpl();
23 27
24 virtual scoped_ptr<InputStream> GetInputStream(JNIEnv* env) const OVERRIDE; 28 virtual scoped_ptr<InputStream> GetInputStream(JNIEnv* env) const OVERRIDE;
25 virtual bool GetMimeType(JNIEnv* env, std::string* mime_type) const OVERRIDE; 29 virtual bool GetMimeType(JNIEnv* env, std::string* mime_type) const OVERRIDE;
26 virtual bool GetCharset(JNIEnv* env, std::string* charset) const OVERRIDE; 30 virtual bool GetCharset(JNIEnv* env, std::string* charset) const OVERRIDE;
31 virtual bool GetStatusInfo(JNIEnv* env,
32 int* status_code,
33 std::string* reason_phrase) const OVERRIDE;
34 virtual bool GetResponseHeaders(
35 JNIEnv* env,
36 net::HttpResponseHeaders* headers) const OVERRIDE;
27 37
28 private: 38 private:
29 base::android::ScopedJavaGlobalRef<jobject> java_object_; 39 base::android::ScopedJavaGlobalRef<jobject> java_object_;
30 40
31 DISALLOW_COPY_AND_ASSIGN(InterceptedRequestDataImpl); 41 DISALLOW_COPY_AND_ASSIGN(AwWebResourceResponseImpl);
32 }; 42 };
33 43
34 bool RegisterInterceptedRequestData(JNIEnv* env); 44 bool RegisterAwWebResourceResponse(JNIEnv* env);
35 45
36 } // namespace android_webview 46 } // namespace android_webview
37 47
38 #endif // ANDROID_WEBVIEW_NATIVE_INTERCEPTED_REQUEST_DATA_IMPL_H_ 48 #endif // ANDROID_WEBVIEW_NATIVE_INTERCEPTED_REQUEST_DATA_IMPL_H_
OLDNEW
« no previous file with comments | « android_webview/native/aw_contents_io_thread_client_impl.cc ('k') | android_webview/native/aw_web_resource_response_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698