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

Unified Diff: content/browser/media/webrtc/webrtc_internals.h

Issue 1855193002: Move the call to enable the WebRTC event log from PeerConnectionFactory to PeerConnection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge with existing WebRtcEventLogHandler. Created 4 years, 7 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: content/browser/media/webrtc/webrtc_internals.h
diff --git a/content/browser/media/webrtc/webrtc_internals.h b/content/browser/media/webrtc/webrtc_internals.h
index e319313df2db8a47b130ca3404f173da82b5f6e1..974981ae77e296288ce1e82e277d68a0273f01d0 100644
--- a/content/browser/media/webrtc/webrtc_internals.h
+++ b/content/browser/media/webrtc/webrtc_internals.h
@@ -5,9 +5,11 @@
#ifndef CONTENT_BROWSER_MEDIA_WEBRTC_WEBRTC_INTERNALS_H_
#define CONTENT_BROWSER_MEDIA_WEBRTC_WEBRTC_INTERNALS_H_
+#include <map>
#include <memory>
#include <queue>
+#include "base/callback_forward.h"
#include "base/containers/hash_tables.h"
#include "base/gtest_prod_util.h"
#include "base/lazy_instance.h"
@@ -102,7 +104,14 @@ class CONTENT_EXPORT WebRTCInternals : public RenderProcessHostObserver,
void SetEventLogRecordings(bool enable, content::WebContents* web_contents);
bool IsEventLogRecordingsEnabled() const;
- const base::FilePath& GetEventLogRecordingsFilePath() const;
+
+ // Register functions to handle starting and stopping the WebRTC event log
+ // functionality from the chrome://webrtc-internals page.
+ typedef base::Callback<void(const base::FilePath&)> event_log_start_func;
+ typedef base::Callback<void()> event_log_stop_func;
dcheng 2016/05/10 06:48:17 Nit: Prefer using to typedef. Also TypeNamesAreWri
Ivo-OOO until feb 6 2016/05/12 13:23:24 Done.
+ void RegisterEventLogHandler(int render_process_id,
+ event_log_start_func start_logging_callback,
+ event_log_stop_func stop_logging_callback);
protected:
// Constructor/Destructor are protected to allow tests to derive from the
@@ -197,7 +206,10 @@ class CONTENT_EXPORT WebRTCInternals : public RenderProcessHostObserver,
// Diagnostic event log recording state.
bool event_log_recordings_;
bool selecting_event_log_;
+ int number_event_log_files_;
base::FilePath event_log_recordings_file_path_;
+ std::map<int, std::pair<event_log_start_func, event_log_stop_func>>
+ event_log_handlers;
Henrik Grunell 2016/05/10 08:44:56 Trailing _.
Ivo-OOO until feb 6 2016/05/12 13:23:24 Done.
// While |peer_connection_data_| is non-empty, hold an instance of
// PowerSaveBlocker. This prevents the application from being suspended while

Powered by Google App Engine
This is Rietveld 408576698