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

Unified Diff: media/blink/webmediaplayer_impl.h

Issue 2445533002: Don't suspend the pipeline before HaveFutureData while decoding progressing (Closed)
Patch Set: Remove unused variable Created 4 years, 1 month 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 | « media/blink/webmediaplayer_delegate.h ('k') | media/blink/webmediaplayer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/webmediaplayer_impl.h
diff --git a/media/blink/webmediaplayer_impl.h b/media/blink/webmediaplayer_impl.h
index 729d41ec4334c2d0b0c9ab65c59daad4e9fb77ef..fa1f3aaf64add02efb4b7ed0b50f5905dec5dc07 100644
--- a/media/blink/webmediaplayer_impl.h
+++ b/media/blink/webmediaplayer_impl.h
@@ -18,6 +18,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "base/threading/thread.h"
+#include "base/time/default_tick_clock.h"
#include "base/timer/elapsed_timer.h"
#include "base/timer/timer.h"
#include "build/build_config.h"
@@ -186,7 +187,7 @@ class MEDIA_BLINK_EXPORT WebMediaPlayerImpl
// WebMediaPlayerDelegate::Observer implementation.
void OnHidden() override;
void OnShown() override;
- void OnSuspendRequested(bool must_suspend) override;
+ bool OnSuspendRequested(bool must_suspend) override;
void OnPlay() override;
void OnPause() override;
void OnVolumeMultiplierUpdate(double multiplier) override;
@@ -563,6 +564,13 @@ class MEDIA_BLINK_EXPORT WebMediaPlayerImpl
int underflow_count_;
std::unique_ptr<base::ElapsedTimer> underflow_timer_;
+ // The last time didLoadingProgress() returned true.
+ base::TimeTicks last_time_loading_progressed_;
+
+ // Points to |default_tick_clock_| by default, but can be overridden by tests.
DaleCurtis 2016/11/03 18:05:47 Just have a single std::unique_ptr<base::TickClock
watk 2016/11/03 19:25:01 oops, done.
+ base::TickClock* tick_clock_;
+ base::DefaultTickClock default_tick_clock_;
+
// Monitors the player events.
base::WeakPtr<MediaObserver> observer_;
« no previous file with comments | « media/blink/webmediaplayer_delegate.h ('k') | media/blink/webmediaplayer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698