Index: media/blink/webmediaplayer_impl.h |
diff --git a/media/blink/webmediaplayer_impl.h b/media/blink/webmediaplayer_impl.h |
index 6de791d257741aa7f358355fe93ae25d08218ba6..a52d363a10491a7459d2d4792745f72eae534966 100644 |
--- a/media/blink/webmediaplayer_impl.h |
+++ b/media/blink/webmediaplayer_impl.h |
@@ -234,6 +234,10 @@ class MEDIA_EXPORT WebMediaPlayerImpl |
// |ended_| state by clamping current time to duration upon |ended_|. |
void UpdatePausedTime(); |
+ // Called at low frequency to tell external observers how much memory we're |
+ // using for video playback. Called by |memory_usage_reporting_timer_|. |
+ void ReportMemoryUsage(); |
+ |
blink::WebLocalFrame* frame_; |
// TODO(hclam): get rid of these members and read from the pipeline directly. |
@@ -301,6 +305,10 @@ class MEDIA_EXPORT WebMediaPlayerImpl |
WebMediaPlayerParams::DeferLoadCB defer_load_cb_; |
WebMediaPlayerParams::Context3DCB context_3d_cb_; |
+ base::RepeatingTimer memory_usage_reporting_timer_; |
+ WebMediaPlayerParams::AdjustAllocatedMemoryCB adjust_allocated_memory_cb_; |
+ int64_t last_reported_memory_usage_; |
+ |
// Routes audio playback to either AudioRendererSink or WebAudio. |
scoped_refptr<WebAudioSourceProviderImpl> audio_source_provider_; |