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

Unified Diff: media/blink/buffered_data_source.h

Issue 1815893002: Merge M50: "Disable "pause-and-buffer" on Android, cancel suspended players." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2661
Patch Set: Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | media/blink/buffered_data_source.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/buffered_data_source.h
diff --git a/media/blink/buffered_data_source.h b/media/blink/buffered_data_source.h
index 49b70f96202d337c96960ac776cf37a2c045656a..57c2b0089f55ecc963b41b65da83bc02f7fcd157 100644
--- a/media/blink/buffered_data_source.h
+++ b/media/blink/buffered_data_source.h
@@ -105,10 +105,12 @@ class BufferedDataSourceInterface : public DataSource {
// Returns true if the resource is local.
virtual bool assume_fully_buffered() = 0;
- // Cancels any open network connections once reaching the deferred state for
- // preload=metadata, non-streaming resources that have not started playback.
- // If already deferred, connections will be immediately closed.
- virtual void OnBufferingHaveEnough() = 0;
+ // Cancels any open network connections once reaching the deferred state. If
+ // |always_cancel| is false this is done only for preload=metadata, non-
+ // streaming resources that have not started playback. If |always_cancel| is
+ // true, all resource types will have their connections canceled. If already
+ // deferred, connections will be immediately closed.
+ virtual void OnBufferingHaveEnough(bool always_cancel) = 0;
// Returns an estimate of the number of bytes held by the data source.
virtual int64_t GetMemoryUsage() const = 0;
@@ -178,10 +180,12 @@ class MEDIA_BLINK_EXPORT BufferedDataSource
// Returns true if the resource is local.
bool assume_fully_buffered() override;
- // Cancels any open network connections once reaching the deferred state for
- // preload=metadata, non-streaming resources that have not started playback.
- // If already deferred, connections will be immediately closed.
- void OnBufferingHaveEnough() override;
+ // Cancels any open network connections once reaching the deferred state. If
+ // |always_cancel| is false this is done only for preload=metadata, non-
+ // streaming resources that have not started playback. If |always_cancel| is
+ // true, all resource types will have their connections canceled. If already
+ // deferred, connections will be immediately closed.
+ void OnBufferingHaveEnough(bool always_cancel) override;
// Returns an estimate of the number of bytes held by the data source.
int64_t GetMemoryUsage() const override;
« no previous file with comments | « no previous file | media/blink/buffered_data_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698