| 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 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 ResourceMultiBufferDataProvider(UrlData* url_data, MultiBufferBlockId pos); | 34 ResourceMultiBufferDataProvider(UrlData* url_data, MultiBufferBlockId pos); |
| 35 ~ResourceMultiBufferDataProvider() override; | 35 ~ResourceMultiBufferDataProvider() override; |
| 36 | 36 |
| 37 // Virtual for testing purposes. | 37 // Virtual for testing purposes. |
| 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 scoped_refptr<DataBuffer> Read() override; | 44 scoped_refptr<DataBuffer> Read() override; |
| 44 void SetDeferred(bool defer) override; | 45 void SetDeferred(bool defer) override; |
| 45 | 46 |
| 46 // blink::WebURLLoaderClient implementation. | 47 // blink::WebURLLoaderClient implementation. |
| 47 void willFollowRedirect( | 48 void willFollowRedirect( |
| 48 blink::WebURLLoader* loader, | 49 blink::WebURLLoader* loader, |
| 49 blink::WebURLRequest& newRequest, | 50 blink::WebURLRequest& newRequest, |
| 50 const blink::WebURLResponse& redirectResponse) override; | 51 const blink::WebURLResponse& redirectResponse) override; |
| 51 void didSendData(blink::WebURLLoader* loader, | 52 void didSendData(blink::WebURLLoader* loader, |
| 52 unsigned long long bytesSent, | 53 unsigned long long bytesSent, |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 | 124 |
| 124 // When we encounter a redirect, this is the source of the redirect. | 125 // When we encounter a redirect, this is the source of the redirect. |
| 125 GURL redirects_to_; | 126 GURL redirects_to_; |
| 126 | 127 |
| 127 base::WeakPtrFactory<ResourceMultiBufferDataProvider> weak_factory_; | 128 base::WeakPtrFactory<ResourceMultiBufferDataProvider> weak_factory_; |
| 128 }; | 129 }; |
| 129 | 130 |
| 130 } // namespace media | 131 } // namespace media |
| 131 | 132 |
| 132 #endif // MEDIA_BLINK_RESOURCE_MULTIBUFFER_RESOURCE_LOADER_H_ | 133 #endif // MEDIA_BLINK_RESOURCE_MULTIBUFFER_RESOURCE_LOADER_H_ |
| OLD | NEW |