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

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

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: Addressed Alpha's comments 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 720821fb575054017e9a00fbeed13ba8545b3033..bdf8e381d2f08b3ae5eb3433a976548d2c8c90d2 100644
--- a/chrome/renderer/media/cast_session.h
+++ b/chrome/renderer/media/cast_session.h
@@ -39,7 +39,7 @@ class CastSession : public base::RefCounted<CastSession> {
public:
typedef
base::Callback<void(const scoped_refptr<media::cast::FrameInput>&)>
- FrameInputAvailableCallback;
+ FrameInputAvailableCallback;
typedef base::Callback<void(const std::vector<char>&)> SendPacketCallback;
typedef base::Callback<void(scoped_ptr<std::string>)> EventLogsCallback;
@@ -57,8 +57,15 @@ class CastSession : public base::RefCounted<CastSession> {
void StartUDP(const net::IPEndPoint& local_endpoint,
const net::IPEndPoint& remote_endpoint);
- // Get raw event logs and provide the results in |callback| on main thread.
- void GetEventLogsAndReset(const EventLogsCallback& callback);
+ // Creates or destroys event subscriber for the audio or video stream.
+ // |enable|: If true, creates an event subscriber. Otherwise destroys
+ // existing subscriber and discards logs.
+ // |is_audio|: true if the event subscriber is for audio. Video otherwise.
+ void ToggleLogging(bool enable, bool is_audio);
+
+ // Returns raw event logs in serialized format for either the audio or video
+ // stream since last call and returns result in |callback|.
+ void GetEventLogsAndReset(bool is_audio, const EventLogsCallback& callback);
private:
friend class base::RefCounted<CastSession>;

Powered by Google App Engine
This is Rietveld 408576698