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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
146 GURL* new_first_party_for_cookies) = 0; | 146 GURL* new_first_party_for_cookies) = 0; |
147 | 147 |
148 // Called when response headers are available (after all redirects have | 148 // Called when response headers are available (after all redirects have |
149 // been followed). | 149 // been followed). |
150 virtual void OnReceivedResponse(const ResourceResponseInfo& info) = 0; | 150 virtual void OnReceivedResponse(const ResourceResponseInfo& info) = 0; |
151 | 151 |
152 // Called when a chunk of response data is downloaded. This method may be | 152 // Called when a chunk of response data is downloaded. This method may be |
153 // called multiple times or not at all if an error occurs. This method is | 153 // called multiple times or not at all if an error occurs. This method is |
154 // only called if RequestInfo::download_to_file was set to true, and in | 154 // only called if RequestInfo::download_to_file was set to true, and in |
155 // that case, OnReceivedData will not be called. | 155 // that case, OnReceivedData will not be called. |
156 virtual void OnDownloadedData(int len) = 0; | 156 // The encoded_data_length is the length of the encoded data transferred |
157 // over the network, which could be different from data length (e.g. for | |
158 // gzipped content), or -1 if if unknown. | |
Nico
2013/09/02 03:50:25
s/if if/if/
So this will only be valid while devt
yusukesuzuki
2013/09/02 04:10:14
Done. I've mentioned it in the CL description and
| |
159 virtual void OnDownloadedData(int len, int encoded_data_length) = 0; | |
157 | 160 |
158 // Called when a chunk of response data is available. This method may | 161 // Called when a chunk of response data is available. This method may |
159 // be called multiple times or not at all if an error occurs. | 162 // be called multiple times or not at all if an error occurs. |
160 // The encoded_data_length is the length of the encoded data transferred | 163 // The encoded_data_length is the length of the encoded data transferred |
161 // over the network, which could be different from data length (e.g. for | 164 // over the network, which could be different from data length (e.g. for |
162 // gzipped content), or -1 if if unknown. | 165 // gzipped content), or -1 if if unknown. |
163 virtual void OnReceivedData(const char* data, | 166 virtual void OnReceivedData(const char* data, |
164 int data_length, | 167 int data_length, |
165 int encoded_data_length) = 0; | 168 int encoded_data_length) = 0; |
166 | 169 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
223 // methods may be called to construct the body of the request. | 226 // methods may be called to construct the body of the request. |
224 WEBKIT_CHILD_EXPORT ResourceLoaderBridge(); | 227 WEBKIT_CHILD_EXPORT ResourceLoaderBridge(); |
225 | 228 |
226 private: | 229 private: |
227 DISALLOW_COPY_AND_ASSIGN(ResourceLoaderBridge); | 230 DISALLOW_COPY_AND_ASSIGN(ResourceLoaderBridge); |
228 }; | 231 }; |
229 | 232 |
230 } // namespace webkit_glue | 233 } // namespace webkit_glue |
231 | 234 |
232 #endif // WEBKIT_CHILD_RESOURCE_LOADER_BRIDGE_H_ | 235 #endif // WEBKIT_CHILD_RESOURCE_LOADER_BRIDGE_H_ |
OLD | NEW |