| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 struct WebURLError; | 42 struct WebURLError; |
| 43 | 43 |
| 44 class BLINK_PLATFORM_EXPORT WebURLLoaderClient { | 44 class BLINK_PLATFORM_EXPORT WebURLLoaderClient { |
| 45 public: | 45 public: |
| 46 // Called when following a redirect. |newRequest| contains the request | 46 // Called when following a redirect. |newRequest| contains the request |
| 47 // generated by the redirect. The client may modify |newRequest|. | 47 // generated by the redirect. The client may modify |newRequest|. |
| 48 // |encodedDataLength| is the size of the data that came from the network | 48 // |encodedDataLength| is the size of the data that came from the network |
| 49 // for this redirect, or zero if the redirect was served from cache. | 49 // for this redirect, or zero if the redirect was served from cache. |
| 50 virtual void willFollowRedirect(WebURLLoader*, | 50 virtual void willFollowRedirect(WebURLLoader*, |
| 51 WebURLRequest& newRequest, | 51 WebURLRequest& newRequest, |
| 52 const WebURLResponse& redirectResponse, | 52 const WebURLResponse& redirectResponse) {} |
| 53 int64_t encodedDataLength) {} | |
| 54 | 53 |
| 55 // Called to report upload progress. The bytes reported correspond to | 54 // Called to report upload progress. The bytes reported correspond to |
| 56 // the HTTP message body. | 55 // the HTTP message body. |
| 57 virtual void didSendData(WebURLLoader*, | 56 virtual void didSendData(WebURLLoader*, |
| 58 unsigned long long bytesSent, | 57 unsigned long long bytesSent, |
| 59 unsigned long long totalBytesToBeSent) {} | 58 unsigned long long totalBytesToBeSent) {} |
| 60 | 59 |
| 61 // Called when response headers are received. | 60 // Called when response headers are received. |
| 62 virtual void didReceiveResponse(WebURLLoader*, const WebURLResponse&) {} | 61 virtual void didReceiveResponse(WebURLLoader*, const WebURLResponse&) {} |
| 63 | 62 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 // known. | 110 // known. |
| 112 static const int64_t kUnknownEncodedDataLength = -1; | 111 static const int64_t kUnknownEncodedDataLength = -1; |
| 113 | 112 |
| 114 protected: | 113 protected: |
| 115 virtual ~WebURLLoaderClient() {} | 114 virtual ~WebURLLoaderClient() {} |
| 116 }; | 115 }; |
| 117 | 116 |
| 118 } // namespace blink | 117 } // namespace blink |
| 119 | 118 |
| 120 #endif | 119 #endif |
| OLD | NEW |