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

Unified Diff: content/browser/media/webrtc/webrtc_callback_interface_impl.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: Introduced WebRTCCallbackInterface. 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_callback_interface_impl.h
diff --git a/content/browser/media/webrtc/webrtc_callback_interface_impl.h b/content/browser/media/webrtc/webrtc_callback_interface_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..8581c0cb7a0c047c33c0807aa2b6f6a26868a14e
--- /dev/null
+++ b/content/browser/media/webrtc/webrtc_callback_interface_impl.h
@@ -0,0 +1,46 @@
+// Copyright (c) 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WEBRTC_CALLBACK_INTERFACE_IMPL_H
+#define WEBRTC_CALLBACK_INTERFACE_IMPL_H
+
+#include <map>
+
+#include "base/callback.h"
+#include "content/public/browser/webrtc_callback_interface.h"
+
+namespace content {
+
+class WebRTCCallbackInterfaceImpl : public WebRTCCallbackInterface {
Henrik Grunell 2016/05/13 09:05:31 The class name doesn't really say much. Could you
Henrik Grunell 2016/05/13 09:05:31 Add comment and describe the class briefly.
Ivo-OOO until feb 6 2016/05/18 16:26:54 I changed it to WebRTCEventLogCallbackHandler.
+ public:
+ WebRTCCallbackInterfaceImpl();
+ ~WebRTCCallbackInterfaceImpl();
+
+ void RegisterEventLogHandler(int render_process_id,
+ EventLogStartFunc start_logging_callback,
+ EventLogStopFunc stop_logging_callback) override;
+
+ void RegisterPeerConnectionCallbacks(
+ int render_process_id,
+ PeerConnectionAddedFunc pc_added_callback,
+ PeerConnectionRemovedFunc pc_removed_callback) override;
+
+ void StartEventLog(int render_process_id,
+ const base::FilePath& file_path) override;
+ void StopEventLog(int render_process_id) override;
+
+ void PeerConnectionAdded(int render_process_id, int connection_id) override;
+ void PeerConnectionRemoved(int render_process_id, int connection_id) override;
+
+ private:
+ std::map<int, std::pair<EventLogStartFunc, EventLogStopFunc>>
dcheng 2016/05/13 06:50:11 pair is pretty inscrutable (first and second are v
Henrik Grunell 2016/05/13 09:05:31 Hmm, I thought there would be one callback only. C
Ivo-OOO until feb 6 2016/05/18 16:26:54 @dcheng: I have rewritten this code to avoid pair.
+ event_log_callbacks_;
+ std::multimap<int,
+ std::pair<PeerConnectionAddedFunc, PeerConnectionRemovedFunc>>
+ peer_connection_callbacks_;
+};
+
+} // namespace content
+
+#endif // WEBRTC_CALLBACK_INTERFACE_IMPL_H

Powered by Google App Engine
This is Rietveld 408576698