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; | |
17 class URLRequest; | 16 class URLRequest; |
18 } | 17 } |
19 | 18 |
20 namespace android_webview { | 19 namespace android_webview { |
21 | 20 |
22 class AwWebResourceResponse; | 21 class AwWebResourceResponse; |
23 | 22 |
24 // 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 |
25 // 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. |
26 // | 25 // |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 // Retrieve the AllowFileAccess setting value of this AwContents. | 87 // Retrieve the AllowFileAccess setting value of this AwContents. |
89 // This method is called on the IO thread only. | 88 // This method is called on the IO thread only. |
90 virtual bool ShouldBlockFileUrls() const = 0; | 89 virtual bool ShouldBlockFileUrls() const = 0; |
91 | 90 |
92 // Retrieve the BlockNetworkLoads setting value of this AwContents. | 91 // Retrieve the BlockNetworkLoads setting value of this AwContents. |
93 // This method is called on the IO thread only. | 92 // This method is called on the IO thread only. |
94 virtual bool ShouldBlockNetworkLoads() const = 0; | 93 virtual bool ShouldBlockNetworkLoads() const = 0; |
95 | 94 |
96 // Retrieve the AcceptThirdPartyCookies setting value of this AwContents. | 95 // Retrieve the AcceptThirdPartyCookies setting value of this AwContents. |
97 virtual bool ShouldAcceptThirdPartyCookies() const = 0; | 96 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; | |
107 }; | 97 }; |
108 | 98 |
109 } // namespace android_webview | 99 } // namespace android_webview |
110 | 100 |
111 #endif // ANDROID_WEBVIEW_BROWSER_AW_CONTENTS_IO_THREAD_CLIENT_H_ | 101 #endif // ANDROID_WEBVIEW_BROWSER_AW_CONTENTS_IO_THREAD_CLIENT_H_ |
OLD | NEW |