OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "content/renderer/webrtc_logging_handler_impl.h" |
| 6 |
| 7 #include "base/logging.h" |
| 8 #include "base/message_loop_proxy.h" |
| 9 #include "content/renderer/webrtc_logging_message_filter.h" |
| 10 |
| 11 namespace content { |
| 12 |
| 13 WebRtcLoggingHandlerImpl::WebRtcLoggingHandlerImpl( |
| 14 const scoped_refptr<WebRtcLoggingMessageFilter>& message_filter, |
| 15 const scoped_refptr<base::MessageLoopProxy>& io_message_loop) |
| 16 : message_filter_(message_filter), |
| 17 io_message_loop_(io_message_loop) { |
| 18 } |
| 19 |
| 20 WebRtcLoggingHandlerImpl::~WebRtcLoggingHandlerImpl() { |
| 21 } |
| 22 |
| 23 void WebRtcLoggingHandlerImpl::OnFilterRemoved() { |
| 24 message_filter_ = NULL; |
| 25 } |
| 26 |
| 27 void WebRtcLoggingHandlerImpl::OpenLog() { |
| 28 DCHECK(io_message_loop_->BelongsToCurrentThread()); |
| 29 // TODO(grunell): Check if already opened. (Could have been opened by another |
| 30 // render view.) |
| 31 if (message_filter_) |
| 32 message_filter_->OpenLog(); |
| 33 } |
| 34 |
| 35 void WebRtcLoggingHandlerImpl::OnLogOpened( |
| 36 base::SharedMemoryHandle handle, |
| 37 uint32 length) { |
| 38 DCHECK(io_message_loop_->BelongsToCurrentThread()); |
| 39 // TODO(grunell): Implement. |
| 40 NOTIMPLEMENTED(); |
| 41 } |
| 42 |
| 43 void WebRtcLoggingHandlerImpl::OnOpenLogFailed() { |
| 44 DCHECK(io_message_loop_->BelongsToCurrentThread()); |
| 45 DLOG(ERROR) << "Could not open log."; |
| 46 // TODO(grunell): Implement. |
| 47 NOTIMPLEMENTED(); |
| 48 } |
| 49 |
| 50 } // namespace content |
OLD | NEW |