OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | |
Henrik Grunell
2016/05/13 09:05:31
Remove "(c)". Same in other new files.
Ivo-OOO until feb 6
2016/05/18 16:26:55
Done.
| |
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_INTERFACE_H | |
Henrik Grunell
2016/05/13 09:05:31
Use full path. "CONTENT_PUBLIC_..._WEBRTC_CALLBACK
Ivo-OOO until feb 6
2016/05/18 16:26:55
Done.
| |
6 #define WEBRTC_INTERFACE_H | |
7 | |
8 #include "base/callback_forward.h" | |
9 #include "base/files/file_path.h" | |
10 #include "content/common/content_export.h" | |
11 | |
12 namespace content { | |
13 | |
14 class CONTENT_EXPORT WebRTCCallbackInterface { | |
Henrik Grunell
2016/05/13 09:05:31
Which of the functions are called from //chrome? I
Ivo-OOO until feb 6
2016/05/18 16:26:55
I removed it, and moved the functions to RenderPro
| |
15 public: | |
16 static WebRTCCallbackInterface* GetInstance(); | |
17 | |
18 // Register functions to handle starting and stopping the WebRTC event log | |
19 // functionality from the chrome://webrtc-internals page. Only one handler can | |
20 // be registered per render process. | |
21 using EventLogStartFunc = base::Callback<void(const base::FilePath&)>; | |
22 using EventLogStopFunc = base::Callback<void()>; | |
23 virtual void RegisterEventLogHandler( | |
24 int render_process_id, | |
25 EventLogStartFunc start_logging_callback, | |
dcheng
2016/05/13 06:50:12
Callbacks should be passed by const reference. Sam
Ivo-OOO until feb 6
2016/05/18 16:26:55
Done.
| |
26 EventLogStopFunc stop_logging_callback) = 0; | |
27 | |
28 // Register callback functions to receive calls when PeerConnections are | |
29 // added or removed. Multiple callbacks can be registered for each render | |
30 // process. | |
31 using PeerConnectionAddedFunc = base::Callback<void(int, int)>; | |
32 using PeerConnectionRemovedFunc = base::Callback<void(int, int)>; | |
33 virtual void RegisterPeerConnectionCallbacks( | |
34 int render_process_id, | |
35 PeerConnectionAddedFunc pc_added_callback, | |
36 PeerConnectionRemovedFunc pc_removed_callback) = 0; | |
37 | |
38 // Signal that an event log should be started for the RenderProcessHost | |
39 // identified by |render_process_id|. | |
40 virtual void StartEventLog(int render_process_id, | |
41 const base::FilePath& file_path) = 0; | |
42 // Signal that an event log should be stopped for the RenderProcessHost | |
43 // identified by |render_process_id|. | |
44 virtual void StopEventLog(int render_process_id) = 0; | |
45 | |
46 // Signal that a PeerConnection was added to the RenderProcessHost | |
47 // identified by |render_process_id|. | |
48 virtual void PeerConnectionAdded(int render_process_id, | |
49 int connection_id) = 0; | |
50 // Signal that a PeerConnection was removed from the RenderProcessHost | |
51 // identified by |render_process_id|. | |
52 virtual void PeerConnectionRemoved(int render_process_id, | |
53 int connection_id) = 0; | |
54 }; | |
55 | |
56 } // namespace content | |
57 | |
58 #endif // WEBRTC_INTERFACE_H | |
OLD | NEW |