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

Unified Diff: content/renderer/media/renderer_webmediaplayer_delegate.h

Issue 1766783003: Expand suspension of idle media players to all platforms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@notify_pause
Patch Set: Simplify. 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
Index: content/renderer/media/renderer_webmediaplayer_delegate.h
diff --git a/content/renderer/media/renderer_webmediaplayer_delegate.h b/content/renderer/media/renderer_webmediaplayer_delegate.h
index 2ca3d46c7652466b38b379177c0d604b31f09e93..0a7813e0bc26f0f603ffbc2ac5151fff0cb5565c 100644
--- a/content/renderer/media/renderer_webmediaplayer_delegate.h
+++ b/content/renderer/media/renderer_webmediaplayer_delegate.h
@@ -53,11 +53,11 @@ class CONTENT_EXPORT RendererWebMediaPlayerDelegate
void WasShown() override;
bool OnMessageReceived(const IPC::Message& msg) override;
- // Sets |idle_cleanup_enabled_| to true, zeros out |idle_cleanup_interval_|,
- // and sets |idle_timeout_| to |idle_timeout|. A zero cleanup interval will
- // cause the idle timer to run with each run of the message loop.
- void EnableInstantIdleCleanupForTesting(base::TimeDelta idle_timeout,
- base::TickClock* tick_clock);
+ // Zeros out |idle_cleanup_interval_|, and sets |idle_timeout_| to
+ // |idle_timeout|. A zero cleanup interval will cause the idle timer to run
+ // with each run of the message loop.
+ void SetIdleCleanupParamsForTesting(base::TimeDelta idle_timeout,
+ base::TickClock* tick_clock);
bool IsIdleCleanupTimerRunningForTesting() const {
return idle_cleanup_timer_.IsRunning();
}
@@ -86,10 +86,6 @@ class CONTENT_EXPORT RendererWebMediaPlayerDelegate
std::map<int, base::TimeTicks> idle_delegate_map_;
base::RepeatingTimer idle_cleanup_timer_;
- // Controls whether cleanup of idle delegates is enabled or not as well as the
- // polling interval and timeout period for delegates; overridden for testing.
- bool idle_cleanup_enabled_ = false;
-
// Amount of time allowed to elapse after a delegate enters the paused before
// the delegate is suspended.
base::TimeDelta idle_timeout_;

Powered by Google App Engine
This is Rietveld 408576698