Index: content/public/browser/webrtc_callback_interface.h |
diff --git a/content/public/browser/webrtc_callback_interface.h b/content/public/browser/webrtc_callback_interface.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..5e237b0912698b7da0b3c4014be399052285a038 |
--- /dev/null |
+++ b/content/public/browser/webrtc_callback_interface.h |
@@ -0,0 +1,58 @@ |
+// 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.
|
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#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.
|
+#define WEBRTC_INTERFACE_H |
+ |
+#include "base/callback_forward.h" |
+#include "base/files/file_path.h" |
+#include "content/common/content_export.h" |
+ |
+namespace content { |
+ |
+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
|
+ public: |
+ static WebRTCCallbackInterface* GetInstance(); |
+ |
+ // Register functions to handle starting and stopping the WebRTC event log |
+ // functionality from the chrome://webrtc-internals page. Only one handler can |
+ // be registered per render process. |
+ using EventLogStartFunc = base::Callback<void(const base::FilePath&)>; |
+ using EventLogStopFunc = base::Callback<void()>; |
+ virtual void RegisterEventLogHandler( |
+ int render_process_id, |
+ 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.
|
+ EventLogStopFunc stop_logging_callback) = 0; |
+ |
+ // Register callback functions to receive calls when PeerConnections are |
+ // added or removed. Multiple callbacks can be registered for each render |
+ // process. |
+ using PeerConnectionAddedFunc = base::Callback<void(int, int)>; |
+ using PeerConnectionRemovedFunc = base::Callback<void(int, int)>; |
+ virtual void RegisterPeerConnectionCallbacks( |
+ int render_process_id, |
+ PeerConnectionAddedFunc pc_added_callback, |
+ PeerConnectionRemovedFunc pc_removed_callback) = 0; |
+ |
+ // Signal that an event log should be started for the RenderProcessHost |
+ // identified by |render_process_id|. |
+ virtual void StartEventLog(int render_process_id, |
+ const base::FilePath& file_path) = 0; |
+ // Signal that an event log should be stopped for the RenderProcessHost |
+ // identified by |render_process_id|. |
+ virtual void StopEventLog(int render_process_id) = 0; |
+ |
+ // Signal that a PeerConnection was added to the RenderProcessHost |
+ // identified by |render_process_id|. |
+ virtual void PeerConnectionAdded(int render_process_id, |
+ int connection_id) = 0; |
+ // Signal that a PeerConnection was removed from the RenderProcessHost |
+ // identified by |render_process_id|. |
+ virtual void PeerConnectionRemoved(int render_process_id, |
+ int connection_id) = 0; |
+}; |
+ |
+} // namespace content |
+ |
+#endif // WEBRTC_INTERFACE_H |