| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 // The intent of this file is to provide a type-neutral abstraction between | 5 // The intent of this file is to provide a type-neutral abstraction between |
| 6 // Chrome and WebKit for resource loading. This pure-virtual interface is | 6 // Chrome and WebKit for resource loading. This pure-virtual interface is |
| 7 // implemented by the embedder, which also provides a factory method Create | 7 // implemented by the embedder, which also provides a factory method Create |
| 8 // to instantiate this object. | 8 // to instantiate this object. |
| 9 // | 9 // |
| 10 // One of these objects will be created by WebKit for each request. WebKit | 10 // One of these objects will be created by WebKit for each request. WebKit |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 // been followed). |content_filtered| is set to true if the contents is | 174 // been followed). |content_filtered| is set to true if the contents is |
| 175 // altered or replaced (usually for security reasons when the resource is | 175 // altered or replaced (usually for security reasons when the resource is |
| 176 // deemed unsafe). | 176 // deemed unsafe). |
| 177 virtual void OnReceivedResponse(const ResponseInfo& info, | 177 virtual void OnReceivedResponse(const ResponseInfo& info, |
| 178 bool content_filtered) = 0; | 178 bool content_filtered) = 0; |
| 179 | 179 |
| 180 // Called when a chunk of response data is available. This method may | 180 // Called when a chunk of response data is available. This method may |
| 181 // be called multiple times or not at all if an error occurs. | 181 // be called multiple times or not at all if an error occurs. |
| 182 virtual void OnReceivedData(const char* data, int len) = 0; | 182 virtual void OnReceivedData(const char* data, int len) = 0; |
| 183 | 183 |
| 184 // Called when metadata generated by the renderer is retrieved from the |
| 185 // cache. This method may be called zero or one times. |
| 186 virtual void OnReceivedCachedMetadata(const char* data, int len) { } |
| 187 |
| 184 // Called when the response is complete. This method signals completion of | 188 // Called when the response is complete. This method signals completion of |
| 185 // the resource load.ff | 189 // the resource load.ff |
| 186 virtual void OnCompletedRequest(const URLRequestStatus& status, | 190 virtual void OnCompletedRequest(const URLRequestStatus& status, |
| 187 const std::string& security_info) = 0; | 191 const std::string& security_info) = 0; |
| 188 | 192 |
| 189 // Returns the URL of the request, which allows us to display it in | 193 // Returns the URL of the request, which allows us to display it in |
| 190 // debugging situations. | 194 // debugging situations. |
| 191 virtual GURL GetURLForDebugging() const = 0; | 195 virtual GURL GetURLForDebugging() const = 0; |
| 192 }; | 196 }; |
| 193 | 197 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 // construction must go through Create() | 255 // construction must go through Create() |
| 252 ResourceLoaderBridge(); | 256 ResourceLoaderBridge(); |
| 253 | 257 |
| 254 private: | 258 private: |
| 255 DISALLOW_COPY_AND_ASSIGN(ResourceLoaderBridge); | 259 DISALLOW_COPY_AND_ASSIGN(ResourceLoaderBridge); |
| 256 }; | 260 }; |
| 257 | 261 |
| 258 } // namespace webkit_glue | 262 } // namespace webkit_glue |
| 259 | 263 |
| 260 #endif // WEBKIT_GLUE_RESOURCE_LOADER_BRIDGE_H_ | 264 #endif // WEBKIT_GLUE_RESOURCE_LOADER_BRIDGE_H_ |
| OLD | NEW |