Chromium Code Reviews| 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/callback_forward.h" | |
| 10 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 11 | 12 |
| 12 class GURL; | 13 class GURL; |
| 13 | 14 |
| 14 namespace net { | 15 namespace net { |
| 15 class HttpResponseHeaders; | 16 class HttpResponseHeaders; |
| 16 class URLRequest; | 17 class URLRequest; |
| 17 } | 18 } |
| 18 | 19 |
| 19 namespace android_webview { | 20 namespace android_webview { |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 62 // An empty scoped_ptr is a valid return value. | 63 // An empty scoped_ptr is a valid return value. |
| 63 static scoped_ptr<AwContentsIoThreadClient> FromID(int render_process_id, | 64 static scoped_ptr<AwContentsIoThreadClient> FromID(int render_process_id, |
| 64 int render_frame_id); | 65 int render_frame_id); |
| 65 | 66 |
| 66 // Called on the IO thread when a subframe is created. | 67 // Called on the IO thread when a subframe is created. |
| 67 static void SubFrameCreated(int render_process_id, | 68 static void SubFrameCreated(int render_process_id, |
| 68 int parent_render_frame_id, | 69 int parent_render_frame_id, |
| 69 int child_render_frame_id); | 70 int child_render_frame_id); |
| 70 | 71 |
| 71 // This method is called on the IO thread only. | 72 // This method is called on the IO thread only. |
| 72 virtual scoped_ptr<AwWebResourceResponse> ShouldInterceptRequest( | 73 virtual void ShouldInterceptRequestAsync( |
| 73 const net::URLRequest* request) = 0; | 74 const net::URLRequest* request, |
| 75 const base::Callback<void(scoped_ptr<AwWebResourceResponse>)> | |
|
boliu
2015/09/28 23:26:28
nit: typedef maybe?
mnaganov (inactive)
2015/09/29 00:14:06
Done.
| |
| 76 callback) = 0; | |
| 74 | 77 |
| 75 // Retrieve the AllowContentAccess setting value of this AwContents. | 78 // Retrieve the AllowContentAccess setting value of this AwContents. |
| 76 // This method is called on the IO thread only. | 79 // This method is called on the IO thread only. |
| 77 virtual bool ShouldBlockContentUrls() const = 0; | 80 virtual bool ShouldBlockContentUrls() const = 0; |
| 78 | 81 |
| 79 // Retrieve the AllowFileAccess setting value of this AwContents. | 82 // Retrieve the AllowFileAccess setting value of this AwContents. |
| 80 // This method is called on the IO thread only. | 83 // This method is called on the IO thread only. |
| 81 virtual bool ShouldBlockFileUrls() const = 0; | 84 virtual bool ShouldBlockFileUrls() const = 0; |
| 82 | 85 |
| 83 // Retrieve the BlockNetworkLoads setting value of this AwContents. | 86 // Retrieve the BlockNetworkLoads setting value of this AwContents. |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 109 | 112 |
| 110 // Called when a response from the server is received with status code >= 400. | 113 // Called when a response from the server is received with status code >= 400. |
| 111 virtual void OnReceivedHttpError( | 114 virtual void OnReceivedHttpError( |
| 112 const net::URLRequest* request, | 115 const net::URLRequest* request, |
| 113 const net::HttpResponseHeaders* response_headers) = 0; | 116 const net::HttpResponseHeaders* response_headers) = 0; |
| 114 }; | 117 }; |
| 115 | 118 |
| 116 } // namespace android_webview | 119 } // namespace android_webview |
| 117 | 120 |
| 118 #endif // ANDROID_WEBVIEW_BROWSER_AW_CONTENTS_IO_THREAD_CLIENT_H_ | 121 #endif // ANDROID_WEBVIEW_BROWSER_AW_CONTENTS_IO_THREAD_CLIENT_H_ |
| OLD | NEW |