OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 // total. Investigate using 0 for all unavailable cases. | 85 // total. Investigate using 0 for all unavailable cases. |
86 // |encodedBodyLength| is the number of bytes used to store this chunk, | 86 // |encodedBodyLength| is the number of bytes used to store this chunk, |
87 // possibly encrypted, excluding headers or framing. It is set even if the | 87 // possibly encrypted, excluding headers or framing. It is set even if the |
88 // response was served from cache. | 88 // response was served from cache. |
89 virtual void didReceiveData(WebURLLoader*, | 89 virtual void didReceiveData(WebURLLoader*, |
90 const char* data, | 90 const char* data, |
91 int dataLength, | 91 int dataLength, |
92 int encodedDataLength, | 92 int encodedDataLength, |
93 int encodedBodyLength) {} | 93 int encodedBodyLength) {} |
94 | 94 |
95 // Called when a chunk of renderer-generated metadata is received from the cac
he. | 95 // Called when a chunk of renderer-generated metadata is received from the |
| 96 // cache. |
96 virtual void didReceiveCachedMetadata(WebURLLoader*, | 97 virtual void didReceiveCachedMetadata(WebURLLoader*, |
97 const char* data, | 98 const char* data, |
98 int dataLength) {} | 99 int dataLength) {} |
99 | 100 |
100 // Called when the load completes successfully. | 101 // Called when the load completes successfully. |
101 // |totalEncodedDataLength| may be equal to kUnknownEncodedDataLength. | 102 // |totalEncodedDataLength| may be equal to kUnknownEncodedDataLength. |
102 virtual void didFinishLoading(WebURLLoader* loader, | 103 virtual void didFinishLoading(WebURLLoader* loader, |
103 double finishTime, | 104 double finishTime, |
104 int64_t totalEncodedDataLength) {} | 105 int64_t totalEncodedDataLength) {} |
105 | 106 |
106 // Called when the load completes with an error. | 107 // Called when the load completes with an error. |
107 virtual void didFail(WebURLLoader*, const WebURLError&) {} | 108 virtual void didFail(WebURLLoader*, const WebURLError&) {} |
108 | 109 |
109 // Value passed to didFinishLoading when total encoded data length isn't known
. | 110 // Value passed to didFinishLoading when total encoded data length isn't |
| 111 // known. |
110 static const int64_t kUnknownEncodedDataLength = -1; | 112 static const int64_t kUnknownEncodedDataLength = -1; |
111 | 113 |
112 protected: | 114 protected: |
113 virtual ~WebURLLoaderClient() {} | 115 virtual ~WebURLLoaderClient() {} |
114 }; | 116 }; |
115 | 117 |
116 } // namespace blink | 118 } // namespace blink |
117 | 119 |
118 #endif | 120 #endif |
OLD | NEW |