OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_BROWSER_AW_CONTENTS_CLIENT_BRIDGE_BASE_H_ | 5 #ifndef ANDROID_WEBVIEW_BROWSER_AW_CONTENTS_CLIENT_BRIDGE_BASE_H_ |
6 #define ANDROID_WEBVIEW_BROWSER_AW_CONTENTS_CLIENT_BRIDGE_BASE_H_ | 6 #define ANDROID_WEBVIEW_BROWSER_AW_CONTENTS_CLIENT_BRIDGE_BASE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "android_webview/browser/net/aw_web_resource_request.h" | |
11 #include "base/supports_user_data.h" | 10 #include "base/supports_user_data.h" |
12 #include "content/public/browser/certificate_request_result_type.h" | 11 #include "content/public/browser/certificate_request_result_type.h" |
13 #include "content/public/browser/javascript_dialog_manager.h" | 12 #include "content/public/browser/javascript_dialog_manager.h" |
14 #include "content/public/browser/resource_request_info.h" | 13 #include "content/public/browser/resource_request_info.h" |
15 #include "net/http/http_response_headers.h" | |
16 | 14 |
17 class GURL; | 15 class GURL; |
18 | 16 |
19 namespace content { | 17 namespace content { |
20 class ClientCertificateDelegate; | 18 class ClientCertificateDelegate; |
21 class WebContents; | 19 class WebContents; |
22 } | 20 } |
23 | 21 |
24 namespace net { | 22 namespace net { |
25 class SSLCertRequestInfo; | 23 class SSLCertRequestInfo; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 const std::string& content_disposition, | 80 const std::string& content_disposition, |
83 const std::string& mime_type, | 81 const std::string& mime_type, |
84 int64_t content_length) = 0; | 82 int64_t content_length) = 0; |
85 | 83 |
86 // Called when a new login request is detected. See the documentation for | 84 // Called when a new login request is detected. See the documentation for |
87 // WebViewClient.onReceivedLoginRequest for arguments. Note that |account| | 85 // WebViewClient.onReceivedLoginRequest for arguments. Note that |account| |
88 // may be empty. | 86 // may be empty. |
89 virtual void NewLoginRequest(const std::string& realm, | 87 virtual void NewLoginRequest(const std::string& realm, |
90 const std::string& account, | 88 const std::string& account, |
91 const std::string& args) = 0; | 89 const std::string& args) = 0; |
92 | |
93 // Called when a resource loading error has occured (e.g. an I/O error, | |
94 // host name lookup failure etc.) | |
95 virtual void OnReceivedError(const AwWebResourceRequest& request, | |
96 int error_code) = 0; | |
97 | |
98 // Called when a response from the server is received with status code >= 400. | |
99 virtual void OnReceivedHttpError( | |
100 const AwWebResourceRequest& request, | |
101 const scoped_refptr<const net::HttpResponseHeaders>& | |
102 response_headers) = 0; | |
103 }; | 90 }; |
104 | 91 |
105 } // namespace android_webview | 92 } // namespace android_webview |
106 | 93 |
107 #endif // ANDROID_WEBVIEW_BROWSER_AW_CONTENTS_CLIENT_BRIDGE_BASE_H_ | 94 #endif // ANDROID_WEBVIEW_BROWSER_AW_CONTENTS_CLIENT_BRIDGE_BASE_H_ |
OLD | NEW |