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" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 static scoped_ptr<AwContentsIoThreadClient> FromID(int render_process_id, | 63 static scoped_ptr<AwContentsIoThreadClient> FromID(int render_process_id, |
64 int render_frame_id); | 64 int render_frame_id); |
65 | 65 |
66 // Called on the IO thread when a subframe is created. | 66 // Called on the IO thread when a subframe is created. |
67 static void SubFrameCreated(int render_process_id, | 67 static void SubFrameCreated(int render_process_id, |
68 int parent_render_frame_id, | 68 int parent_render_frame_id, |
69 int child_render_frame_id); | 69 int child_render_frame_id); |
70 | 70 |
71 // This method is called on the IO thread only. | 71 // This method is called on the IO thread only. |
72 virtual scoped_ptr<AwWebResourceResponse> ShouldInterceptRequest( | 72 virtual scoped_ptr<AwWebResourceResponse> ShouldInterceptRequest( |
73 const GURL& location, | |
74 const net::URLRequest* request) = 0; | 73 const net::URLRequest* request) = 0; |
75 | 74 |
76 // Retrieve the AllowContentAccess setting value of this AwContents. | 75 // Retrieve the AllowContentAccess setting value of this AwContents. |
77 // This method is called on the IO thread only. | 76 // This method is called on the IO thread only. |
78 virtual bool ShouldBlockContentUrls() const = 0; | 77 virtual bool ShouldBlockContentUrls() const = 0; |
79 | 78 |
80 // Retrieve the AllowFileAccess setting value of this AwContents. | 79 // Retrieve the AllowFileAccess setting value of this AwContents. |
81 // This method is called on the IO thread only. | 80 // This method is called on the IO thread only. |
82 virtual bool ShouldBlockFileUrls() const = 0; | 81 virtual bool ShouldBlockFileUrls() const = 0; |
83 | 82 |
(...skipping 13 matching lines...) Expand all Loading... |
97 const std::string& mime_type, | 96 const std::string& mime_type, |
98 int64 content_length) = 0; | 97 int64 content_length) = 0; |
99 | 98 |
100 // Called when a new login request is detected. See the documentation for | 99 // Called when a new login request is detected. See the documentation for |
101 // WebViewClient.onReceivedLoginRequest for arguments. Note that |account| | 100 // WebViewClient.onReceivedLoginRequest for arguments. Note that |account| |
102 // may be empty. | 101 // may be empty. |
103 virtual void NewLoginRequest(const std::string& realm, | 102 virtual void NewLoginRequest(const std::string& realm, |
104 const std::string& account, | 103 const std::string& account, |
105 const std::string& args) = 0; | 104 const std::string& args) = 0; |
106 | 105 |
| 106 // Called when a resource loading error has occured (e.g. an I/O error, |
| 107 // host name lookup failure etc.) |
| 108 virtual void OnReceivedError(const net::URLRequest* request) = 0; |
| 109 |
107 // Called when a response from the server is received with status code >= 400. | 110 // Called when a response from the server is received with status code >= 400. |
108 virtual void OnReceivedHttpError( | 111 virtual void OnReceivedHttpError( |
109 const net::URLRequest* request, | 112 const net::URLRequest* request, |
110 const net::HttpResponseHeaders* response_headers) = 0; | 113 const net::HttpResponseHeaders* response_headers) = 0; |
111 }; | 114 }; |
112 | 115 |
113 } // namespace android_webview | 116 } // namespace android_webview |
114 | 117 |
115 #endif // ANDROID_WEBVIEW_BROWSER_AW_CONTENTS_IO_THREAD_CLIENT_H_ | 118 #endif // ANDROID_WEBVIEW_BROWSER_AW_CONTENTS_IO_THREAD_CLIENT_H_ |
OLD | NEW |