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

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: pass presubmit 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
« no previous file with comments | « chrome/renderer/media/cast_session.h ('k') | chrome/renderer/media/cast_session_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..49b43020de2d8fbaffcc362d729e11ac5f5ab02f 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::ToggleLogging(bool is_audio, bool enable) {
+ io_message_loop_proxy_->PostTask(
+ FROM_HERE,
+ base::Bind(&CastSessionDelegate::ToggleLogging,
+ base::Unretained(delegate_.get()),
+ is_audio,
+ enable));
+}
+
+void CastSession::GetEventLogsAndReset(
+ bool is_audio, const EventLogsCallback& callback) {
io_message_loop_proxy_->PostTask(
FROM_HERE,
base::Bind(&CastSessionDelegate::GetEventLogsAndReset,
base::Unretained(delegate_.get()),
- callback));
+ is_audio,
+ media::BindToCurrentLoop(callback)));
}
« no previous file with comments | « chrome/renderer/media/cast_session.h ('k') | chrome/renderer/media/cast_session_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698