| 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 // altered or replaced (usually for security reasons when the resource is | 103 // altered or replaced (usually for security reasons when the resource is |
| 104 // deemed unsafe). | 104 // deemed unsafe). |
| 105 virtual void OnReceivedResponse(const ResponseInfo& info, | 105 virtual void OnReceivedResponse(const ResponseInfo& info, |
| 106 bool content_filtered) = 0; | 106 bool content_filtered) = 0; |
| 107 | 107 |
| 108 // Called when a chunk of response data is available. This method may | 108 // Called when a chunk of response data is available. This method may |
| 109 // be called multiple times or not at all if an error occurs. | 109 // be called multiple times or not at all if an error occurs. |
| 110 virtual void OnReceivedData(const char* data, int len) = 0; | 110 virtual void OnReceivedData(const char* data, int len) = 0; |
| 111 | 111 |
| 112 // Called when the response is complete. This method signals completion of | 112 // Called when the response is complete. This method signals completion of |
| 113 // the resource load. | 113 // the resource load.ff |
| 114 virtual void OnCompletedRequest(const URLRequestStatus& status) = 0; | 114 virtual void OnCompletedRequest(const URLRequestStatus& status) = 0; |
| 115 | 115 |
| 116 // Returns the URL of the request, which allows us to display it in | 116 // Returns the URL of the request, which allows us to display it in |
| 117 // debugging situations. | 117 // debugging situations. |
| 118 virtual std::string GetURLForDebugging() = 0; | 118 virtual std::string GetURLForDebugging() = 0; |
| 119 }; | 119 }; |
| 120 | 120 |
| 121 // use Create() for construction, but anybody can delete at any time, | 121 // use Create() for construction, but anybody can delete at any time, |
| 122 // INCLUDING during processing of callbacks. | 122 // INCLUDING during processing of callbacks. |
| 123 virtual ~ResourceLoaderBridge(); | 123 virtual ~ResourceLoaderBridge(); |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 // construction must go through Create() | 202 // construction must go through Create() |
| 203 ResourceLoaderBridge(); | 203 ResourceLoaderBridge(); |
| 204 | 204 |
| 205 private: | 205 private: |
| 206 DISALLOW_EVIL_CONSTRUCTORS(ResourceLoaderBridge); | 206 DISALLOW_EVIL_CONSTRUCTORS(ResourceLoaderBridge); |
| 207 }; | 207 }; |
| 208 | 208 |
| 209 } // namespace webkit_glue | 209 } // namespace webkit_glue |
| 210 | 210 |
| 211 #endif // RESOURCE_LOADER_BRIDGE_ | 211 #endif // RESOURCE_LOADER_BRIDGE_ |
| OLD | NEW |