This source file includes following definitions.
- InitWebRtcLoggingDelegate
- InitWebRtcLogging
- WebRtcLogMessage
#include "content/renderer/media/webrtc_logging.h"
#include "base/time/time.h"
#include "content/public/renderer/webrtc_log_message_delegate.h"
#include "third_party/libjingle/overrides/talk/base/logging.h"
namespace content {
WebRtcLogMessageDelegate* g_webrtc_logging_delegate = NULL;
void InitWebRtcLoggingDelegate(WebRtcLogMessageDelegate* delegate) {
CHECK(!g_webrtc_logging_delegate);
CHECK(delegate);
g_webrtc_logging_delegate = delegate;
}
void InitWebRtcLogging() {
talk_base::InitDiagnosticLoggingDelegateFunction(&WebRtcLogMessage);
}
void WebRtcLogMessage(const std::string& message) {
if (g_webrtc_logging_delegate)
g_webrtc_logging_delegate->LogMessage(message);
}
}