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

Unified Diff: chrome/browser/tab_contents/ipc_status_view.cc

Issue 20015: Make it easier to create new IPC channel types (i.e. renderer/plugin). Inste... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 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 | « chrome/browser/tab_contents/interstitial_page.h ('k') | chrome/browser/tab_contents/web_contents.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/ipc_status_view.cc
===================================================================
--- chrome/browser/tab_contents/ipc_status_view.cc (revision 9103)
+++ chrome/browser/tab_contents/ipc_status_view.cc (working copy)
@@ -2,6 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+// Need to include this before any other file because it defines
+// IPC_MESSAGE_LOG_ENABLED.
+#include "chrome/common/ipc_message.h"
+
+#ifdef IPC_MESSAGE_LOG_ENABLED
+#define IPC_MESSAGE_MACROS_LOG_ENABLED
+
#include "chrome/browser/tab_contents/ipc_status_view.h"
#include <stdio.h>
@@ -17,8 +24,6 @@
#include "chrome/common/pref_service.h"
#include "chrome/common/render_messages.h"
-#ifdef IPC_MESSAGE_LOG_ENABLED
-
using base::Time;
namespace {
@@ -39,19 +44,6 @@
kParamsColumn,
};
-// This class ensures that we have a link dependency on render_messages.cc and
-// plugin_messages.cc, and at the same time sets up the message logger function
-// mappings.
-class RegisterLoggerFuncs {
- public:
- RegisterLoggerFuncs() {
- RenderMessagesInit();
- PluginMessagesInit();
- }
-};
-
-RegisterLoggerFuncs g_register_logger_funcs;
-
} // namespace
IPCStatusView* IPCStatusView::current_;
@@ -70,7 +62,16 @@
plugin_process_ = NULL;
plugin_process_host_ = NULL;
- IPC::Logging::current()->SetConsumer(this);
+ IPC::Logging* log = IPC::Logging::current();
+ log->RegisterMessageLogger(ViewStart, ViewMsgLog);
+ log->RegisterMessageLogger(ViewHostStart, ViewHostMsgLog);
+ log->RegisterMessageLogger(PluginProcessStart, PluginProcessMsgLog);
+ log->RegisterMessageLogger(PluginProcessHostStart, PluginProcessHostMsgLog);
+ log->RegisterMessageLogger(PluginStart, PluginMsgLog);
+ log->RegisterMessageLogger(PluginHostStart, PluginHostMsgLog);
+ log->RegisterMessageLogger(NPObjectStart, NPObjectMsgLog);
+
+ log->SetConsumer(this);
}
IPCStatusView::~IPCStatusView() {
« no previous file with comments | « chrome/browser/tab_contents/interstitial_page.h ('k') | chrome/browser/tab_contents/web_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698