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

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

Issue 170063006: Cast: Add JS API to get raw events logs from cast extension. (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.cc
diff --git a/chrome/renderer/media/cast_session.cc b/chrome/renderer/media/cast_session.cc
index 5fcf3f9f1f8ae33d632c29346cf059e9f6bd374f..1b2190ef9795a003e1b4093794b4c09cc6b006cf 100644
--- a/chrome/renderer/media/cast_session.cc
+++ b/chrome/renderer/media/cast_session.cc
@@ -11,6 +11,7 @@
#include "media/base/video_frame.h"
#include "media/cast/cast_config.h"
#include "media/cast/cast_sender.h"
+#include "media/cast/logging/logging_defines.h"
CastSession::CastSession()
: delegate_(new CastSessionDelegate()),
@@ -63,10 +64,21 @@ void CastSession::StartUDP(const net::IPEndPoint& local_endpoint,
remote_endpoint));
}
-void CastSession::GetEventLogsAndReset(const EventLogsCallback& callback) {
+void CastSession::StartLogging(const int stream_id, const bool is_audio) {
+ io_message_loop_proxy_->PostTask(
+ FROM_HERE,
+ base::Bind(&CastSessionDelegate::StartLogging,
+ base::Unretained(delegate_.get()),
+ stream_id,
+ is_audio));
+}
+
+void CastSession::GetEventLogsAndReset(const EventLogsCallback& callback,
+ const int stream_id) {
io_message_loop_proxy_->PostTask(
FROM_HERE,
base::Bind(&CastSessionDelegate::GetEventLogsAndReset,
base::Unretained(delegate_.get()),
- callback));
+ media::BindToCurrentLoop(callback),
+ stream_id));
}

Powered by Google App Engine
This is Rietveld 408576698