| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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, int encodedDataL
ength) { } | 58 virtual void didDownloadData(WebURLLoader*, int dataLength, int encodedDataL
ength) { } |
| 59 | 59 |
| 60 // Called when a chunk of response data is received. | 60 // Called when a chunk of response data is received. |
| 61 virtual void didReceiveData(WebURLLoader*, const char* data, int dataLength,
int encodedDataLength) { } | 61 virtual void didReceiveData(WebURLLoader*, const char* data, int dataLength,
int encodedDataLength) { } |
| 62 | 62 |
| 63 // Called when a chunk of renderer-generated metadata is received from the c
ache. | 63 // 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) { } | 64 virtual void didReceiveCachedMetadata(WebURLLoader*, const char* data, int d
ataLength) { } |
| 65 | 65 |
| 66 // FIXME: remove this method when embedder implement new API. | |
| 67 virtual void didFinishLoading(WebURLLoader*, double finishTime) { } | |
| 68 | |
| 69 // Called when the load completes successfully. | 66 // Called when the load completes successfully. |
| 70 // |totalEncodedDataLength| may be equal to kUnknownEncodedDataLength. | 67 // |totalEncodedDataLength| may be equal to kUnknownEncodedDataLength. |
| 71 // FIXME: remove default implementation when embedder implement new API. | 68 virtual void didFinishLoading(WebURLLoader* loader, double finishTime, int64
_t totalEncodedDataLength) { } |
| 72 virtual void didFinishLoading(WebURLLoader* loader, double finishTime, int64
_t totalEncodedDataLength) | |
| 73 { | |
| 74 didFinishLoading(loader, finishTime); | |
| 75 } | |
| 76 | 69 |
| 77 // Called when the load completes with an error. | 70 // Called when the load completes with an error. |
| 78 virtual void didFail(WebURLLoader*, const WebURLError&) { } | 71 virtual void didFail(WebURLLoader*, const WebURLError&) { } |
| 79 | 72 |
| 80 // Value passed to didFinishLoading when total encoded data length isn't kno
wn. | 73 // Value passed to didFinishLoading when total encoded data length isn't kno
wn. |
| 81 static const int64_t kUnknownEncodedDataLength = -1; | 74 static const int64_t kUnknownEncodedDataLength = -1; |
| 82 | 75 |
| 83 protected: | 76 protected: |
| 84 virtual ~WebURLLoaderClient() { } | 77 virtual ~WebURLLoaderClient() { } |
| 85 }; | 78 }; |
| 86 | 79 |
| 87 } // namespace blink | 80 } // namespace blink |
| 88 | 81 |
| 89 #endif | 82 #endif |
| OLD | NEW |