| 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 // 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. | 7 // implemented by the embedder. |
| 8 // | 8 // |
| 9 // One of these objects will be created by WebKit for each request. WebKit | 9 // One of these objects will be created by WebKit for each request. WebKit |
| 10 // will own the pointer to the bridge, and will delete it when the request is | 10 // will own the pointer to the bridge, and will delete it when the request is |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 virtual void OnReceivedCachedMetadata(const char* data, int len) { } | 174 virtual void OnReceivedCachedMetadata(const char* data, int len) { } |
| 175 | 175 |
| 176 // Called when the response is complete. This method signals completion of | 176 // Called when the response is complete. This method signals completion of |
| 177 // the resource load. | 177 // the resource load. |
| 178 virtual void OnCompletedRequest( | 178 virtual void OnCompletedRequest( |
| 179 int error_code, | 179 int error_code, |
| 180 bool was_ignored_by_handler, | 180 bool was_ignored_by_handler, |
| 181 const std::string& security_info, | 181 const std::string& security_info, |
| 182 const base::TimeTicks& completion_time) = 0; | 182 const base::TimeTicks& completion_time) = 0; |
| 183 | 183 |
| 184 virtual void OnStartedRequestForFrame() { } |
| 185 |
| 184 protected: | 186 protected: |
| 185 virtual ~Peer() {} | 187 virtual ~Peer() {} |
| 186 }; | 188 }; |
| 187 | 189 |
| 188 // use WebKitPlatformSupportImpl::CreateResourceLoader() for construction, but | 190 // use WebKitPlatformSupportImpl::CreateResourceLoader() for construction, but |
| 189 // anybody can delete at any time, INCLUDING during processing of callbacks. | 191 // anybody can delete at any time, INCLUDING during processing of callbacks. |
| 190 WEBKIT_CHILD_EXPORT virtual ~ResourceLoaderBridge(); | 192 WEBKIT_CHILD_EXPORT virtual ~ResourceLoaderBridge(); |
| 191 | 193 |
| 192 // Call this method before calling Start() to set the request body. | 194 // Call this method before calling Start() to set the request body. |
| 193 // May only be used with HTTP(S) POST requests. | 195 // May only be used with HTTP(S) POST requests. |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 // methods may be called to construct the body of the request. | 230 // methods may be called to construct the body of the request. |
| 229 WEBKIT_CHILD_EXPORT ResourceLoaderBridge(); | 231 WEBKIT_CHILD_EXPORT ResourceLoaderBridge(); |
| 230 | 232 |
| 231 private: | 233 private: |
| 232 DISALLOW_COPY_AND_ASSIGN(ResourceLoaderBridge); | 234 DISALLOW_COPY_AND_ASSIGN(ResourceLoaderBridge); |
| 233 }; | 235 }; |
| 234 | 236 |
| 235 } // namespace webkit_glue | 237 } // namespace webkit_glue |
| 236 | 238 |
| 237 #endif // WEBKIT_CHILD_RESOURCE_LOADER_BRIDGE_H_ | 239 #endif // WEBKIT_CHILD_RESOURCE_LOADER_BRIDGE_H_ |
| OLD | NEW |