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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 | 171 |
172 // Called when metadata generated by the renderer is retrieved from the | 172 // Called when metadata generated by the renderer is retrieved from the |
173 // cache. This method may be called zero or one times. | 173 // cache. This method may be called zero or one times. |
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 bool stale_copy_in_cache, |
181 const std::string& security_info, | 182 const std::string& security_info, |
182 const base::TimeTicks& completion_time) = 0; | 183 const base::TimeTicks& completion_time) = 0; |
183 | 184 |
184 protected: | 185 protected: |
185 virtual ~Peer() {} | 186 virtual ~Peer() {} |
186 }; | 187 }; |
187 | 188 |
188 // use WebKitPlatformSupportImpl::CreateResourceLoader() for construction, but | 189 // use WebKitPlatformSupportImpl::CreateResourceLoader() for construction, but |
189 // anybody can delete at any time, INCLUDING during processing of callbacks. | 190 // anybody can delete at any time, INCLUDING during processing of callbacks. |
190 WEBKIT_CHILD_EXPORT virtual ~ResourceLoaderBridge(); | 191 WEBKIT_CHILD_EXPORT virtual ~ResourceLoaderBridge(); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 // methods may be called to construct the body of the request. | 229 // methods may be called to construct the body of the request. |
229 WEBKIT_CHILD_EXPORT ResourceLoaderBridge(); | 230 WEBKIT_CHILD_EXPORT ResourceLoaderBridge(); |
230 | 231 |
231 private: | 232 private: |
232 DISALLOW_COPY_AND_ASSIGN(ResourceLoaderBridge); | 233 DISALLOW_COPY_AND_ASSIGN(ResourceLoaderBridge); |
233 }; | 234 }; |
234 | 235 |
235 } // namespace webkit_glue | 236 } // namespace webkit_glue |
236 | 237 |
237 #endif // WEBKIT_CHILD_RESOURCE_LOADER_BRIDGE_H_ | 238 #endif // WEBKIT_CHILD_RESOURCE_LOADER_BRIDGE_H_ |
OLD | NEW |