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

Side by Side Diff: android_webview/browser/net/aw_web_resource_request.h

Issue 2558223002: Move onReceivedError and onReceivedHttpError out of AwContentsIoThreadClientImpl (Closed)
Patch Set: address code review Created 4 years 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
OLDNEW
(Empty)
1 // Copyright 2016 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_NET_AW_WEB_RESOURCE_REQUEST_H_
6 #define ANDROID_WEBVIEW_BROWSER_NET_AW_WEB_RESOURCE_REQUEST_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "base/android/jni_array.h"
12 #include "base/android/jni_string.h"
13
14 namespace net {
15 class URLRequest;
16 }
17
18 namespace android_webview {
19
20 // A passive data structure only used to carry request information.
21 struct AwWebResourceRequest {
22 explicit AwWebResourceRequest(const net::URLRequest& request);
23 virtual ~AwWebResourceRequest() {}
24
25 // The java equivalent
26 struct AwJavaWebResourceRequest {
27 base::android::ScopedJavaLocalRef<jstring> jurl;
28 base::android::ScopedJavaLocalRef<jstring> jmethod;
29 base::android::ScopedJavaLocalRef<jobjectArray> jheader_names;
30 base::android::ScopedJavaLocalRef<jobjectArray> jheader_values;
31 };
32
33 // Convenience method to convert AwWebResourceRequest to Java equivalent.
34 static void ConvertToJava(JNIEnv* env,
35 const AwWebResourceRequest& request,
36 AwJavaWebResourceRequest* jRequest);
37
38 std::string url;
39 std::string method;
40 bool is_main_frame;
41 bool has_user_gesture;
42 std::vector<std::string> header_names;
43 std::vector<std::string> header_values;
44 };
45
46 } // namespace android_webview
47
48 #endif // ANDROID_WEBVIEW_BROWSER_NET_AW_WEB_RESOURCE_REQUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698