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

Unified Diff: chrome/renderer/media/cast_session.h

Issue 184853003: Cast: Add GetStats() extensions API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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: chrome/renderer/media/cast_session.h
diff --git a/chrome/renderer/media/cast_session.h b/chrome/renderer/media/cast_session.h
index 237ea2fa696d4915ad2fd5ef0431068f6b471d0c..f76286c7c810e5ebedd7b8ef442d6651f8718c6e 100644
--- a/chrome/renderer/media/cast_session.h
+++ b/chrome/renderer/media/cast_session.h
@@ -42,6 +42,7 @@ class CastSession : public base::RefCounted<CastSession> {
FrameInputAvailableCallback;
typedef base::Callback<void(const std::vector<char>&)> SendPacketCallback;
typedef base::Callback<void(scoped_ptr<std::string>)> EventLogsCallback;
+ typedef base::Callback<void(scoped_ptr<std::string>)> StatsCallback;
CastSession();
@@ -67,6 +68,10 @@ class CastSession : public base::RefCounted<CastSession> {
// stream since last call and returns result in |callback|.
void GetEventLogsAndReset(bool is_audio, const EventLogsCallback& callback);
+ // Returns stats in a string formatted in JSON for either the audio or video
+ // stream since last call and returns result in |callback|.
+ void GetStatsAndReset(bool is_audio, const StatsCallback& callback);
Alpha Left Google 2014/03/03 07:11:39 Statistics is continuous unlike events. So "AndRes
imcheng 2014/03/04 02:06:24 In the implementation we will probably do a reset
+
private:
friend class base::RefCounted<CastSession>;
virtual ~CastSession();

Powered by Google App Engine
This is Rietveld 408576698