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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef WEBRTC_CALLBACK_INTERFACE_IMPL_H
6 #define WEBRTC_CALLBACK_INTERFACE_IMPL_H
7
8 #include <map>
9
10 #include "base/callback.h"
11 #include "content/public/browser/webrtc_callback_interface.h"
12
13 namespace content {
14
15 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.
16 public:
17 WebRTCCallbackInterfaceImpl();
18 ~WebRTCCallbackInterfaceImpl();
19
20 void RegisterEventLogHandler(int render_process_id,
21 EventLogStartFunc start_logging_callback,
22 EventLogStopFunc stop_logging_callback) override;
23
24 void RegisterPeerConnectionCallbacks(
25 int render_process_id,
26 PeerConnectionAddedFunc pc_added_callback,
27 PeerConnectionRemovedFunc pc_removed_callback) override;
28
29 void StartEventLog(int render_process_id,
30 const base::FilePath& file_path) override;
31 void StopEventLog(int render_process_id) override;
32
33 void PeerConnectionAdded(int render_process_id, int connection_id) override;
34 void PeerConnectionRemoved(int render_process_id, int connection_id) override;
35
36 private:
37 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.
38 event_log_callbacks_;
39 std::multimap<int,
40 std::pair<PeerConnectionAddedFunc, PeerConnectionRemovedFunc>>
41 peer_connection_callbacks_;
42 };
43
44 } // namespace content
45
46 #endif // WEBRTC_CALLBACK_INTERFACE_IMPL_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698