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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 #include "base/callback_forward.h" | 13 #include "base/callback_forward.h" |
14 | 14 |
15 namespace net { | 15 namespace net { |
| 16 class HttpResponseHeaders; |
16 class URLRequest; | 17 class URLRequest; |
17 } | 18 } |
18 | 19 |
19 namespace android_webview { | 20 namespace android_webview { |
20 | 21 |
21 class AwWebResourceResponse; | 22 class AwWebResourceResponse; |
22 | 23 |
23 // This class provides a means of calling Java methods on an instance that has | 24 // This class provides a means of calling Java methods on an instance that has |
24 // a 1:1 relationship with a WebContents instance directly from the IO thread. | 25 // a 1:1 relationship with a WebContents instance directly from the IO thread. |
25 // | 26 // |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 // Retrieve the AllowFileAccess setting value of this AwContents. | 88 // Retrieve the AllowFileAccess setting value of this AwContents. |
88 // This method is called on the IO thread only. | 89 // This method is called on the IO thread only. |
89 virtual bool ShouldBlockFileUrls() const = 0; | 90 virtual bool ShouldBlockFileUrls() const = 0; |
90 | 91 |
91 // Retrieve the BlockNetworkLoads setting value of this AwContents. | 92 // Retrieve the BlockNetworkLoads setting value of this AwContents. |
92 // This method is called on the IO thread only. | 93 // This method is called on the IO thread only. |
93 virtual bool ShouldBlockNetworkLoads() const = 0; | 94 virtual bool ShouldBlockNetworkLoads() const = 0; |
94 | 95 |
95 // Retrieve the AcceptThirdPartyCookies setting value of this AwContents. | 96 // Retrieve the AcceptThirdPartyCookies setting value of this AwContents. |
96 virtual bool ShouldAcceptThirdPartyCookies() const = 0; | 97 virtual bool ShouldAcceptThirdPartyCookies() const = 0; |
| 98 |
| 99 // Called when a resource loading error has occured (e.g. an I/O error, |
| 100 // host name lookup failure etc.) |
| 101 virtual void OnReceivedError(const net::URLRequest* request) = 0; |
| 102 |
| 103 // Called when a response from the server is received with status code >= 400. |
| 104 virtual void OnReceivedHttpError( |
| 105 const net::URLRequest* request, |
| 106 const net::HttpResponseHeaders* response_headers) = 0; |
97 }; | 107 }; |
98 | 108 |
99 } // namespace android_webview | 109 } // namespace android_webview |
100 | 110 |
101 #endif // ANDROID_WEBVIEW_BROWSER_AW_CONTENTS_IO_THREAD_CLIENT_H_ | 111 #endif // ANDROID_WEBVIEW_BROWSER_AW_CONTENTS_IO_THREAD_CLIENT_H_ |
OLD | NEW |