OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef THIRD_PARTY_LIBJINGLE_OVERRIDES_LOGGING_LOG_MESSAGE_DELEGATE_H_ | 5 #ifndef THIRD_PARTY_LIBJINGLE_OVERRIDES_LOGGING_LOG_MESSAGE_DELEGATE_H_ |
6 #define THIRD_PARTY_LIBJINGLE_OVERRIDES_LOGGING_LOG_MESSAGE_DELEGATE_H_ | 6 #define THIRD_PARTY_LIBJINGLE_OVERRIDES_LOGGING_LOG_MESSAGE_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 namespace talk_base { | 10 namespace talk_base { |
11 | 11 |
12 // This interface is implemented by a handler in Chromium and used by the | 12 // This interface is implemented by a handler in Chromium and used by the |
13 // overridden logging.h/cc in libjingle. The purpose is to forward libjingle | 13 // overridden logging.h/cc in libjingle. The purpose is to forward libjingle |
14 // logging messages to Chromium (besides to the ordinary logging stream) that | 14 // logging messages to Chromium (besides to the ordinary logging stream) that |
15 // will be used for diagnostic purposes. LogMessage can be called on any thread | 15 // will be used for diagnostic purposes. LogMessage can be called on any thread |
16 // used by libjingle. | 16 // used by libjingle. |
17 class LogMessageDelegate { | 17 class LogMessageDelegate { |
18 public: | 18 public: |
| 19 virtual void InitLogging(const std::string& app_session_id, |
| 20 const std::string& app_url) = 0; |
19 virtual void LogMessage(const std::string& message) = 0; | 21 virtual void LogMessage(const std::string& message) = 0; |
20 | 22 |
21 protected: | 23 protected: |
22 virtual ~LogMessageDelegate() {} | 24 virtual ~LogMessageDelegate() {} |
23 }; | 25 }; |
24 | 26 |
25 } // namespace talk_base | 27 } // namespace talk_base |
26 | 28 |
27 #endif // THIRD_PARTY_LIBJINGLE_OVERRIDES_LOGGING_LOG_MESSAGE_DELEGATE_H_ | 29 #endif // THIRD_PARTY_LIBJINGLE_OVERRIDES_LOGGING_LOG_MESSAGE_DELEGATE_H_ |
OLD | NEW |