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

Unified Diff: content/renderer/media/webrtc_logging_message_filter.cc

Issue 15741003: Moving WebRTC logging related files from content to chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/media/webrtc_logging_message_filter.h ('k') | content/renderer/render_thread_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/webrtc_logging_message_filter.cc
diff --git a/content/renderer/media/webrtc_logging_message_filter.cc b/content/renderer/media/webrtc_logging_message_filter.cc
deleted file mode 100644
index 155de2787eecf56a65d027db7bc85e11f5819127..0000000000000000000000000000000000000000
--- a/content/renderer/media/webrtc_logging_message_filter.cc
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "content/renderer/media/webrtc_logging_message_filter.h"
-
-#include "base/logging.h"
-#include "base/message_loop_proxy.h"
-#include "content/common/media/webrtc_logging_messages.h"
-#include "content/renderer/media/webrtc_logging_handler_impl.h"
-#include "ipc/ipc_logging.h"
-#include "third_party/libjingle/overrides/talk/base/logging.h"
-
-namespace content {
-
-WebRtcLoggingMessageFilter::WebRtcLoggingMessageFilter(
- const scoped_refptr<base::MessageLoopProxy>& io_message_loop)
- : logging_handler_(NULL),
- io_message_loop_(io_message_loop),
- channel_(NULL) {
-}
-
-WebRtcLoggingMessageFilter::~WebRtcLoggingMessageFilter() {
-}
-
-bool WebRtcLoggingMessageFilter::OnMessageReceived(
- const IPC::Message& message) {
- DCHECK(io_message_loop_->BelongsToCurrentThread());
- bool handled = true;
- IPC_BEGIN_MESSAGE_MAP(WebRtcLoggingMessageFilter, message)
- IPC_MESSAGE_HANDLER(WebRtcLoggingMsg_LogOpened, OnLogOpened)
- IPC_MESSAGE_HANDLER(WebRtcLoggingMsg_OpenLogFailed, OnOpenLogFailed)
- IPC_MESSAGE_UNHANDLED(handled = false)
- IPC_END_MESSAGE_MAP()
- return handled;
-}
-
-void WebRtcLoggingMessageFilter::OnFilterAdded(IPC::Channel* channel) {
- DCHECK(io_message_loop_->BelongsToCurrentThread());
- channel_ = channel;
-}
-
-void WebRtcLoggingMessageFilter::OnFilterRemoved() {
- DCHECK(io_message_loop_->BelongsToCurrentThread());
- channel_ = NULL;
- logging_handler_->OnFilterRemoved();
-}
-
-void WebRtcLoggingMessageFilter::OnChannelClosing() {
- DCHECK(io_message_loop_->BelongsToCurrentThread());
- channel_ = NULL;
- logging_handler_->OnFilterRemoved();
-}
-
-void WebRtcLoggingMessageFilter::InitLogging(
- WebRtcLoggingHandlerImpl* logging_handler,
- const std::string& app_session_id,
- const std::string& app_url) {
- DCHECK(io_message_loop_->BelongsToCurrentThread());
- DCHECK(!logging_handler_);
- logging_handler_ = logging_handler;
- Send(new WebRtcLoggingMsg_OpenLog(app_session_id, app_url));
-}
-
-void WebRtcLoggingMessageFilter::OnLogOpened(
- base::SharedMemoryHandle handle,
- uint32 length) {
- DCHECK(io_message_loop_->BelongsToCurrentThread());
- if (logging_handler_)
- logging_handler_->OnLogOpened(handle, length);
-}
-
-void WebRtcLoggingMessageFilter::OnOpenLogFailed() {
- DCHECK(io_message_loop_->BelongsToCurrentThread());
- if (logging_handler_)
- logging_handler_->OnOpenLogFailed();
-}
-
-void WebRtcLoggingMessageFilter::Send(IPC::Message* message) {
- DCHECK(io_message_loop_->BelongsToCurrentThread());
- if (!channel_) {
- DLOG(ERROR) << "IPC channel not available.";
- delete message;
- } else {
- channel_->Send(message);
- }
-}
-
-} // namespace content
« no previous file with comments | « content/renderer/media/webrtc_logging_message_filter.h ('k') | content/renderer/render_thread_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698