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

Side by Side Diff: content/renderer/media/buffered_data_source_host_impl.h

Issue 275303002: Non-const impls. for WebMediaPlayer::didLoadingProgress(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove mutable bools. Created 6 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 CONTENT_RENDERER_MEDIA_BUFFERED_DATA_SOURCE_HOST_IMPL_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_BUFFERED_DATA_SOURCE_HOST_IMPL_H_
6 #define CONTENT_RENDERER_MEDIA_BUFFERED_DATA_SOURCE_HOST_IMPL_H_ 6 #define CONTENT_RENDERER_MEDIA_BUFFERED_DATA_SOURCE_HOST_IMPL_H_
7 7
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "content/common/content_export.h" 9 #include "content/common/content_export.h"
10 #include "content/renderer/media/buffered_data_source.h" 10 #include "content/renderer/media/buffered_data_source.h"
(...skipping 11 matching lines...) Expand all
22 22
23 // BufferedDataSourceHost implementation. 23 // BufferedDataSourceHost implementation.
24 virtual void SetTotalBytes(int64 total_bytes) OVERRIDE; 24 virtual void SetTotalBytes(int64 total_bytes) OVERRIDE;
25 virtual void AddBufferedByteRange(int64 start, int64 end) OVERRIDE; 25 virtual void AddBufferedByteRange(int64 start, int64 end) OVERRIDE;
26 26
27 // Translate the byte ranges to time ranges and append them to the list. 27 // Translate the byte ranges to time ranges and append them to the list.
28 void AddBufferedTimeRanges( 28 void AddBufferedTimeRanges(
29 media::Ranges<base::TimeDelta>* buffered_time_ranges, 29 media::Ranges<base::TimeDelta>* buffered_time_ranges,
30 base::TimeDelta media_duration); 30 base::TimeDelta media_duration);
31 31
32 // TODO(sandersd): Change this to non-const along with Pipeline's version. 32 bool DidLoadingProgress();
33 // http://crbug.com/360251
34 bool DidLoadingProgress() const;
35 33
36 private: 34 private:
37 // Total size of the data source. 35 // Total size of the data source.
38 int64 total_bytes_; 36 int64 total_bytes_;
39 37
40 // List of buffered byte ranges for estimating buffered time. 38 // List of buffered byte ranges for estimating buffered time.
41 media::Ranges<int64> buffered_byte_ranges_; 39 media::Ranges<int64> buffered_byte_ranges_;
42 40
43 // True when AddBufferedByteRange() has been called more recently than 41 // True when AddBufferedByteRange() has been called more recently than
44 // DidLoadingProgress(). 42 // DidLoadingProgress().
45 mutable bool did_loading_progress_; 43 bool did_loading_progress_;
46 44
47 DISALLOW_COPY_AND_ASSIGN(BufferedDataSourceHostImpl); 45 DISALLOW_COPY_AND_ASSIGN(BufferedDataSourceHostImpl);
48 }; 46 };
49 47
50 } // namespace content 48 } // namespace content
51 49
52 #endif // CONTENT_RENDERER_MEDIA_BUFFERED_DATA_SOURCE_HOST_IMPL_H_ 50 #endif // CONTENT_RENDERER_MEDIA_BUFFERED_DATA_SOURCE_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « content/renderer/media/android/webmediaplayer_android.cc ('k') | content/renderer/media/buffered_data_source_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698