| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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 CHROME_RENDERER_MEDIA_CHROME_WEBRTC_LOG_MESSAGE_DELEGATE_H_ | 5 #ifndef CHROME_RENDERER_MEDIA_CHROME_WEBRTC_LOG_MESSAGE_DELEGATE_H_ |
| 6 #define CHROME_RENDERER_MEDIA_CHROME_WEBRTC_LOG_MESSAGE_DELEGATE_H_ | 6 #define CHROME_RENDERER_MEDIA_CHROME_WEBRTC_LOG_MESSAGE_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 : public content::WebRtcLogMessageDelegate, | 27 : public content::WebRtcLogMessageDelegate, |
| 28 public base::NonThreadSafe { | 28 public base::NonThreadSafe { |
| 29 public: | 29 public: |
| 30 ChromeWebRtcLogMessageDelegate( | 30 ChromeWebRtcLogMessageDelegate( |
| 31 const scoped_refptr<base::MessageLoopProxy>& io_message_loop, | 31 const scoped_refptr<base::MessageLoopProxy>& io_message_loop, |
| 32 WebRtcLoggingMessageFilter* message_filter); | 32 WebRtcLoggingMessageFilter* message_filter); |
| 33 | 33 |
| 34 virtual ~ChromeWebRtcLogMessageDelegate(); | 34 virtual ~ChromeWebRtcLogMessageDelegate(); |
| 35 | 35 |
| 36 // content::WebRtcLogMessageDelegate implementation. | 36 // content::WebRtcLogMessageDelegate implementation. |
| 37 virtual void LogMessage(const std::string& message) OVERRIDE; | 37 virtual void LogMessage(const std::string& message) override; |
| 38 | 38 |
| 39 void OnFilterRemoved(); | 39 void OnFilterRemoved(); |
| 40 | 40 |
| 41 void OnStartLogging(); | 41 void OnStartLogging(); |
| 42 void OnStopLogging(); | 42 void OnStopLogging(); |
| 43 | 43 |
| 44 private: | 44 private: |
| 45 void LogMessageOnIOThread(const WebRtcLoggingMessageData& message); | 45 void LogMessageOnIOThread(const WebRtcLoggingMessageData& message); |
| 46 void SendLogBuffer(); | 46 void SendLogBuffer(); |
| 47 | 47 |
| 48 scoped_refptr<base::MessageLoopProxy> io_message_loop_; | 48 scoped_refptr<base::MessageLoopProxy> io_message_loop_; |
| 49 bool logging_started_; | 49 bool logging_started_; |
| 50 std::vector<WebRtcLoggingMessageData> log_buffer_; | 50 std::vector<WebRtcLoggingMessageData> log_buffer_; |
| 51 | 51 |
| 52 base::TimeTicks last_log_buffer_send_; | 52 base::TimeTicks last_log_buffer_send_; |
| 53 | 53 |
| 54 WebRtcLoggingMessageFilter* message_filter_; | 54 WebRtcLoggingMessageFilter* message_filter_; |
| 55 | 55 |
| 56 DISALLOW_COPY_AND_ASSIGN(ChromeWebRtcLogMessageDelegate); | 56 DISALLOW_COPY_AND_ASSIGN(ChromeWebRtcLogMessageDelegate); |
| 57 }; | 57 }; |
| 58 | 58 |
| 59 #endif // CHROME_RENDERER_MEDIA_CHROME_WEBRTC_LOG_MESSAGE_DELEGATE_H_ | 59 #endif // CHROME_RENDERER_MEDIA_CHROME_WEBRTC_LOG_MESSAGE_DELEGATE_H_ |
| OLD | NEW |