Upstreaming browser/ui/uikit_ui_util from iOS.
[chromium-blink-merge.git] / content / public / renderer / webrtc_log_message_delegate.h
blob351cf9efd50e5d1ef3bb8198ad229805ef241a86
1 // Copyright 2013 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.
5 #ifndef CONTENT_PUBLIC_RENDERER_WEBRTC_LOG_MESSAGE_DELEGATE_H_
6 #define CONTENT_PUBLIC_RENDERER_WEBRTC_LOG_MESSAGE_DELEGATE_H_
8 #include <string>
10 #include "content/common/content_export.h"
12 namespace content {
14 // This interface is implemented by a handler in the embedder and used for
15 // initializing the logging and passing log messages to the handler. The
16 // purpose is to forward mainly libjingle log messages to embedder (besides
17 // the ordinary logging stream) that will be used for diagnostic purposes.
18 class WebRtcLogMessageDelegate {
19 public:
20 // Pass a diagnostic WebRTC log message.
21 virtual void LogMessage(const std::string& message) = 0;
23 protected:
24 virtual ~WebRtcLogMessageDelegate() {}
27 // Must be called on IO thread.
28 CONTENT_EXPORT void InitWebRtcLoggingDelegate(
29 WebRtcLogMessageDelegate* delegate);
31 // Must be called on IO thread.
32 CONTENT_EXPORT void InitWebRtcLogging();
34 } // namespace content
36 #endif // CONTENT_PUBLIC_RENDERER_WEBRTC_LOG_MESSAGE_DELEGATE_H_