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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 // Called to report upload progress. The bytes reported correspond to | 48 // Called to report upload progress. The bytes reported correspond to |
49 // the HTTP message body. | 49 // the HTTP message body. |
50 virtual void didSendData( | 50 virtual void didSendData( |
51 WebURLLoader*, unsigned long long bytesSent, unsigned long long totalByt
esToBeSent) { } | 51 WebURLLoader*, unsigned long long bytesSent, unsigned long long totalByt
esToBeSent) { } |
52 | 52 |
53 // Called when response headers are received. | 53 // Called when response headers are received. |
54 virtual void didReceiveResponse(WebURLLoader*, const WebURLResponse&) { } | 54 virtual void didReceiveResponse(WebURLLoader*, const WebURLResponse&) { } |
55 | 55 |
56 // Called when a chunk of response data is downloaded. This is only called | 56 // Called when a chunk of response data is downloaded. This is only called |
57 // if WebURLRequest's downloadToFile flag was set to true. | 57 // if WebURLRequest's downloadToFile flag was set to true. |
58 virtual void didDownloadData(WebURLLoader*, int dataLength) { } | 58 virtual void didDownloadData(WebURLLoader*, int dataLength, int encodedDataL
ength) { } |
| 59 // FIXME: Remove this stub function when Chrome-side change propagating the |
| 60 // encodedDataLength is landed. |
| 61 virtual void didDownloadData(WebURLLoader* loader, int dataLength) { didDown
loadData(loader, dataLength, -1); } |
59 | 62 |
60 // Called when a chunk of response data is received. | 63 // Called when a chunk of response data is received. |
61 virtual void didReceiveData(WebURLLoader*, const char* data, int dataLength,
int encodedDataLength) { } | 64 virtual void didReceiveData(WebURLLoader*, const char* data, int dataLength,
int encodedDataLength) { } |
62 | 65 |
63 // Called when a chunk of renderer-generated metadata is received from the c
ache. | 66 // Called when a chunk of renderer-generated metadata is received from the c
ache. |
64 virtual void didReceiveCachedMetadata(WebURLLoader*, const char* data, int d
ataLength) { } | 67 virtual void didReceiveCachedMetadata(WebURLLoader*, const char* data, int d
ataLength) { } |
65 | 68 |
66 // Called when the load completes successfully. | 69 // Called when the load completes successfully. |
67 virtual void didFinishLoading(WebURLLoader*, double finishTime) { } | 70 virtual void didFinishLoading(WebURLLoader*, double finishTime) { } |
68 | 71 |
69 // Called when the load completes with an error. | 72 // Called when the load completes with an error. |
70 virtual void didFail(WebURLLoader*, const WebURLError&) { } | 73 virtual void didFail(WebURLLoader*, const WebURLError&) { } |
71 | 74 |
72 protected: | 75 protected: |
73 virtual ~WebURLLoaderClient() { } | 76 virtual ~WebURLLoaderClient() { } |
74 }; | 77 }; |
75 | 78 |
76 } // namespace WebKit | 79 } // namespace WebKit |
77 | 80 |
78 #endif | 81 #endif |
OLD | NEW |