Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(222)

Side by Side Diff: chrome/renderer/media/webrtc_logging_handler_impl.h

Issue 15741003: Moving WebRTC logging related files from content to chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code review. Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 CONTENT_RENDERER_MEDIA_WEBRTC_LOGGING_HANDLER_IMPL_H_ 5 #ifndef CHROME_RENDERER_MEDIA_WEBRTC_LOGGING_HANDLER_IMPL_H_
6 #define CONTENT_RENDERER_MEDIA_WEBRTC_LOGGING_HANDLER_IMPL_H_ 6 #define CHROME_RENDERER_MEDIA_WEBRTC_LOGGING_HANDLER_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/shared_memory.h" 10 #include "base/shared_memory.h"
11 #include "base/threading/non_thread_safe.h" 11 #include "content/public/renderer/webrtc_log_message_delegate.h"
12 #include "content/common/content_export.h"
13 #include "ipc/ipc_channel_proxy.h" 12 #include "ipc/ipc_channel_proxy.h"
14 #include "third_party/libjingle/overrides/logging/log_message_delegate.h"
15 13
16 namespace base { 14 namespace base {
17 class MessageLoopProxy; 15 class MessageLoopProxy;
18 } 16 }
19 17
20 namespace content { 18 namespace chrome {
21 19
22 class PartialCircularBuffer; 20 class PartialCircularBuffer;
23 class WebRtcLoggingMessageFilter; 21 class WebRtcLoggingMessageFilter;
24 22
25 // WebRtcLoggingHandlerImpl handles WebRTC logging. There is one object per 23 // WebRtcLoggingHandlerImpl handles WebRTC logging. There is one object per
26 // render process, owned by WebRtcLoggingMessageFilter. It communicates with 24 // render process, owned by WebRtcLoggingMessageFilter. It communicates with
27 // WebRtcLoggingHandlerHost and receives logging messages from libjingle and 25 // WebRtcLoggingHandlerHost and receives logging messages from libjingle and
28 // writes them to a shared memory buffer. 26 // writes them to a shared memory buffer.
29 class CONTENT_EXPORT WebRtcLoggingHandlerImpl 27 class WebRtcLoggingHandlerImpl
jam 2013/05/30 15:01:17 nit: chrome implementations of content interface F
Henrik Grunell 2013/05/31 19:26:38 So, wouldn't this class be called ChromeWebRtcLogM
jam 2013/05/31 19:38:10 oops, sorry yes that would be ChromeWebRtcLogMessa
30 : public NON_EXPORTED_BASE(talk_base::LogMessageDelegate), 28 : public content::WebRtcLogMessageDelegate,
31 public NON_EXPORTED_BASE(base::NonThreadSafe) { 29 public base::NonThreadSafe {
32 public: 30 public:
33 WebRtcLoggingHandlerImpl( 31 WebRtcLoggingHandlerImpl(
34 const scoped_refptr<base::MessageLoopProxy>& io_message_loop); 32 const scoped_refptr<base::MessageLoopProxy>& io_message_loop,
33 WebRtcLoggingMessageFilter* message_filter);
35 34
36 virtual ~WebRtcLoggingHandlerImpl(); 35 virtual ~WebRtcLoggingHandlerImpl();
37 36
38 // talk_base::LogMessageDelegate implementation. 37 // content::WebRtcLogMessageDelegate implementation.
38 virtual void InitLogging(const std::string& app_session_id,
39 const std::string& app_url) OVERRIDE;
39 virtual void LogMessage(const std::string& message) OVERRIDE; 40 virtual void LogMessage(const std::string& message) OVERRIDE;
40 41
41 void OnFilterRemoved(); 42 void OnFilterRemoved();
42 43
43 void OnLogOpened(base::SharedMemoryHandle handle, uint32 length); 44 void OnLogOpened(base::SharedMemoryHandle handle, uint32 length);
44 void OnOpenLogFailed(); 45 void OnOpenLogFailed();
45 46
46 private: 47 private:
47 scoped_refptr<base::MessageLoopProxy> io_message_loop_; 48 scoped_refptr<base::MessageLoopProxy> io_message_loop_;
48 scoped_ptr<base::SharedMemory> shared_memory_; 49 scoped_ptr<base::SharedMemory> shared_memory_;
49 scoped_ptr<content::PartialCircularBuffer> circular_buffer_; 50 scoped_ptr<chrome::PartialCircularBuffer> circular_buffer_;
51
52 WebRtcLoggingMessageFilter* message_filter_;
53 bool log_initialized_;
50 54
51 DISALLOW_COPY_AND_ASSIGN(WebRtcLoggingHandlerImpl); 55 DISALLOW_COPY_AND_ASSIGN(WebRtcLoggingHandlerImpl);
52 }; 56 };
53 57
54 } // namespace content 58 } // namespace chrome
55 59
56 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_LOGGING_HANDLER_IMPL_H_ 60 #endif // CHROME_RENDERER_MEDIA_WEBRTC_LOGGING_HANDLER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698