Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(666)

Side by Side Diff: media/blink/resource_multibuffer_data_provider.h

Issue 1971373002: Fix progress reporting for multibuffers to report progress for every byte we receive. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments addressed Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « media/blink/multibuffer_unittest.cc ('k') | media/blink/resource_multibuffer_data_provider.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « media/blink/multibuffer_unittest.cc ('k') | media/blink/resource_multibuffer_data_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698