OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef MEDIA_BLINK_RESOURCE_MULTIBUFFER_DATA_PROVIDER_H_ | 5 #ifndef MEDIA_BLINK_RESOURCE_MULTIBUFFER_DATA_PROVIDER_H_ |
6 #define MEDIA_BLINK_RESOURCE_MULTIBUFFER_DATA_PROVIDER_H_ | 6 #define MEDIA_BLINK_RESOURCE_MULTIBUFFER_DATA_PROVIDER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 27 matching lines...) Expand all Loading... |
38 virtual void Start(); | 38 virtual void Start(); |
39 | 39 |
40 // MultiBuffer::DataProvider implementation | 40 // MultiBuffer::DataProvider implementation |
41 MultiBufferBlockId Tell() const override; | 41 MultiBufferBlockId Tell() const override; |
42 bool Available() const override; | 42 bool Available() const override; |
43 int64_t AvailableBytes() const override; | 43 int64_t AvailableBytes() const override; |
44 scoped_refptr<DataBuffer> Read() override; | 44 scoped_refptr<DataBuffer> Read() override; |
45 void SetDeferred(bool defer) override; | 45 void SetDeferred(bool defer) override; |
46 | 46 |
47 // blink::WebURLLoaderClient implementation. | 47 // blink::WebURLLoaderClient implementation. |
48 void willFollowRedirect( | 48 void willFollowRedirect(blink::WebURLLoader* loader, |
49 blink::WebURLLoader* loader, | 49 blink::WebURLRequest& newRequest, |
50 blink::WebURLRequest& newRequest, | 50 const blink::WebURLResponse& redirectResponse, |
51 const blink::WebURLResponse& redirectResponse) override; | 51 int64_t encodedDataLength) override; |
52 void didSendData(blink::WebURLLoader* loader, | 52 void didSendData(blink::WebURLLoader* loader, |
53 unsigned long long bytesSent, | 53 unsigned long long bytesSent, |
54 unsigned long long totalBytesToBeSent) override; | 54 unsigned long long totalBytesToBeSent) override; |
55 void didReceiveResponse(blink::WebURLLoader* loader, | 55 void didReceiveResponse(blink::WebURLLoader* loader, |
56 const blink::WebURLResponse& response) override; | 56 const blink::WebURLResponse& response) override; |
57 void didDownloadData(blink::WebURLLoader* loader, | 57 void didDownloadData(blink::WebURLLoader* loader, |
58 int data_length, | 58 int data_length, |
59 int encoded_data_length) override; | 59 int encoded_data_length) override; |
60 void didReceiveData(blink::WebURLLoader* loader, | 60 void didReceiveData(blink::WebURLLoader* loader, |
61 const char* data, | 61 const char* data, |
62 int data_length, | 62 int data_length, |
63 int encoded_data_length) override; | 63 int encoded_data_length, |
| 64 int encoded_body_length) override; |
64 void didReceiveCachedMetadata(blink::WebURLLoader* loader, | 65 void didReceiveCachedMetadata(blink::WebURLLoader* loader, |
65 const char* data, | 66 const char* data, |
66 int dataLength) override; | 67 int dataLength) override; |
67 void didFinishLoading(blink::WebURLLoader* loader, | 68 void didFinishLoading(blink::WebURLLoader* loader, |
68 double finishTime, | 69 double finishTime, |
69 int64_t total_encoded_data_length) override; | 70 int64_t total_encoded_data_length) override; |
70 void didFail(blink::WebURLLoader* loader, const blink::WebURLError&) override; | 71 void didFail(blink::WebURLLoader* loader, const blink::WebURLError&) override; |
71 | 72 |
72 // Use protected instead of private for testing purposes. | 73 // Use protected instead of private for testing purposes. |
73 protected: | 74 protected: |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 | 128 |
128 // When we encounter a redirect, this is the source of the redirect. | 129 // When we encounter a redirect, this is the source of the redirect. |
129 GURL redirects_to_; | 130 GURL redirects_to_; |
130 | 131 |
131 base::WeakPtrFactory<ResourceMultiBufferDataProvider> weak_factory_; | 132 base::WeakPtrFactory<ResourceMultiBufferDataProvider> weak_factory_; |
132 }; | 133 }; |
133 | 134 |
134 } // namespace media | 135 } // namespace media |
135 | 136 |
136 #endif // MEDIA_BLINK_RESOURCE_MULTIBUFFER_DATA_PROVIDER_H_ | 137 #endif // MEDIA_BLINK_RESOURCE_MULTIBUFFER_DATA_PROVIDER_H_ |
OLD | NEW |