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

Unified Diff: content/browser/media/media_internals.h

Issue 1169983003: media-internals: Store updates when cannot update. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 | content/browser/media/media_internals.cc » ('j') | content/browser/media/media_internals.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/media/media_internals.h
diff --git a/content/browser/media/media_internals.h b/content/browser/media/media_internals.h
index 72efdd6b5e93d05d12289f1f5af63dc3989d6993..634d06d844df447d0b8365ab089c82afb5ed79a7 100644
--- a/content/browser/media/media_internals.h
+++ b/content/browser/media/media_internals.h
@@ -50,6 +50,9 @@ class CONTENT_EXPORT MediaInternals
// thread.
bool CanUpdate();
+ // Replay all saved media events.
+ void SendHistoricalMediaEvents();
+
// Sends all audio cached data to each registered UpdateCallback.
void SendAudioStreamData();
@@ -86,6 +89,10 @@ class CONTENT_EXPORT MediaInternals
// thread, but will forward to the IO thread.
void SendUpdate(const base::string16& update);
+ // Saves |update| so that they can be sent when there are UpdateCallback
+ // registered.
+ void SaveUpdate(const base::string16& update);
+
// Caches |value| under |cache_key| so that future SendAudioLogUpdate() calls
// will include the current data. Calls JavaScript |function|(|value|) for
// each registered UpdateCallback.
@@ -109,6 +116,7 @@ class CONTENT_EXPORT MediaInternals
// All variables below must be accessed under |lock_|.
base::Lock lock_;
bool can_update_;
+ std::list<base::string16> pending_updates_;
base::DictionaryValue audio_streams_cached_data_;
int owner_ids_[AUDIO_COMPONENT_MAX];
scoped_ptr<MediaInternalsUMAHandler> uma_handler_;
« no previous file with comments | « no previous file | content/browser/media/media_internals.cc » ('j') | content/browser/media/media_internals.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698