| 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 <string> | 10 #include <string> |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "third_party/WebKit/public/platform/WebURLRequest.h" | 21 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
| 22 #include "third_party/WebKit/public/web/WebFrame.h" | 22 #include "third_party/WebKit/public/web/WebFrame.h" |
| 23 #include "url/gurl.h" | 23 #include "url/gurl.h" |
| 24 | 24 |
| 25 namespace media { | 25 namespace media { |
| 26 | 26 |
| 27 class MEDIA_BLINK_EXPORT ResourceMultiBufferDataProvider | 27 class MEDIA_BLINK_EXPORT ResourceMultiBufferDataProvider |
| 28 : NON_EXPORTED_BASE(public MultiBuffer::DataProvider), | 28 : NON_EXPORTED_BASE(public MultiBuffer::DataProvider), |
| 29 NON_EXPORTED_BASE(public blink::WebURLLoaderClient) { | 29 NON_EXPORTED_BASE(public blink::WebURLLoaderClient) { |
| 30 public: | 30 public: |
| 31 // NUmber of times we'll retry if the connection fails. |
| 32 enum { kMaxRetries = 30 }; |
| 33 |
| 31 ResourceMultiBufferDataProvider(UrlData* url_data, MultiBufferBlockId pos); | 34 ResourceMultiBufferDataProvider(UrlData* url_data, MultiBufferBlockId pos); |
| 32 ~ResourceMultiBufferDataProvider() override; | 35 ~ResourceMultiBufferDataProvider() override; |
| 33 | 36 |
| 34 // Virtual for testing purposes. | 37 // Virtual for testing purposes. |
| 35 virtual void Start(); | 38 virtual void Start(); |
| 36 | 39 |
| 37 // MultiBuffer::DataProvider implementation | 40 // MultiBuffer::DataProvider implementation |
| 38 MultiBufferBlockId Tell() const override; | 41 MultiBufferBlockId Tell() const override; |
| 39 bool Available() const override; | 42 bool Available() const override; |
| 40 scoped_refptr<DataBuffer> Read() override; | 43 scoped_refptr<DataBuffer> Read() override; |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 | 122 |
| 120 // When we encounter a redirect, this is the source of the redirect. | 123 // When we encounter a redirect, this is the source of the redirect. |
| 121 GURL redirects_to_; | 124 GURL redirects_to_; |
| 122 | 125 |
| 123 base::WeakPtrFactory<ResourceMultiBufferDataProvider> weak_factory_; | 126 base::WeakPtrFactory<ResourceMultiBufferDataProvider> weak_factory_; |
| 124 }; | 127 }; |
| 125 | 128 |
| 126 } // namespace media | 129 } // namespace media |
| 127 | 130 |
| 128 #endif // MEDIA_BLINK_RESOURCE_MULTIBUFFER_RESOURCE_LOADER_H_ | 131 #endif // MEDIA_BLINK_RESOURCE_MULTIBUFFER_RESOURCE_LOADER_H_ |
| OLD | NEW |