OLD | NEW |
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_BROWSER_AW_CONTENTS_IO_THREAD_CLIENT_H_ | 5 #ifndef ANDROID_WEBVIEW_BROWSER_AW_CONTENTS_IO_THREAD_CLIENT_H_ |
6 #define ANDROID_WEBVIEW_BROWSER_AW_CONTENTS_IO_THREAD_CLIENT_H_ | 6 #define ANDROID_WEBVIEW_BROWSER_AW_CONTENTS_IO_THREAD_CLIENT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 | 11 |
12 class GURL; | 12 class GURL; |
13 | 13 |
14 namespace net { | 14 namespace net { |
| 15 class HttpResponseHeaders; |
15 class URLRequest; | 16 class URLRequest; |
16 } | 17 } |
17 | 18 |
18 namespace android_webview { | 19 namespace android_webview { |
19 | 20 |
20 class AwWebResourceResponse; | 21 class AwWebResourceResponse; |
21 | 22 |
22 // This class provides a means of calling Java methods on an instance that has | 23 // This class provides a means of calling Java methods on an instance that has |
23 // a 1:1 relationship with a WebContents instance directly from the IO thread. | 24 // a 1:1 relationship with a WebContents instance directly from the IO thread. |
24 // | 25 // |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 const std::string& content_disposition, | 96 const std::string& content_disposition, |
96 const std::string& mime_type, | 97 const std::string& mime_type, |
97 int64 content_length) = 0; | 98 int64 content_length) = 0; |
98 | 99 |
99 // Called when a new login request is detected. See the documentation for | 100 // Called when a new login request is detected. See the documentation for |
100 // WebViewClient.onReceivedLoginRequest for arguments. Note that |account| | 101 // WebViewClient.onReceivedLoginRequest for arguments. Note that |account| |
101 // may be empty. | 102 // may be empty. |
102 virtual void NewLoginRequest(const std::string& realm, | 103 virtual void NewLoginRequest(const std::string& realm, |
103 const std::string& account, | 104 const std::string& account, |
104 const std::string& args) = 0; | 105 const std::string& args) = 0; |
| 106 |
| 107 // Called when a response from the server is received with status code >= 400. |
| 108 virtual void OnReceivedHttpError( |
| 109 const net::URLRequest* request, |
| 110 const net::HttpResponseHeaders* response_headers) = 0; |
105 }; | 111 }; |
106 | 112 |
107 } // namespace android_webview | 113 } // namespace android_webview |
108 | 114 |
109 #endif // ANDROID_WEBVIEW_BROWSER_AW_CONTENTS_IO_THREAD_CLIENT_H_ | 115 #endif // ANDROID_WEBVIEW_BROWSER_AW_CONTENTS_IO_THREAD_CLIENT_H_ |
OLD | NEW |