diff options
author | pfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-12 17:47:13 +0000 |
---|---|---|
committer | pfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-12 17:47:13 +0000 |
commit | 9e1ee54c1043f807382dc77db107fe229722dde6 (patch) | |
tree | 460456ba868846842d31ac1c3fadc6935635aa8c /content/common/devtools_messages.h | |
parent | 1cb5feecbe49bf66b45201d57635d7415383373d (diff) | |
download | chromium_src-9e1ee54c1043f807382dc77db107fe229722dde6.zip chromium_src-9e1ee54c1043f807382dc77db107fe229722dde6.tar.gz chromium_src-9e1ee54c1043f807382dc77db107fe229722dde6.tar.bz2 |
DevTools: provide a way for browser process to log into the renderer's tools console.
BUG=116769
Review URL: http://codereview.chromium.org/9663051
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126164 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common/devtools_messages.h')
-rw-r--r-- | content/common/devtools_messages.h | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/content/common/devtools_messages.h b/content/common/devtools_messages.h index f342e5de..f718bac 100644 --- a/content/common/devtools_messages.h +++ b/content/common/devtools_messages.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 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. @@ -43,6 +43,7 @@ #include <string> #include "content/common/content_export.h" +#include "content/public/common/console_message_level.h" #include "ipc/ipc_message_macros.h" #undef IPC_MESSAGE_EXPORT @@ -50,6 +51,24 @@ #define IPC_MESSAGE_START DevToolsMsgStart +// Singly-included section since need custom serialization. +#ifndef CONTENT_COMMON_DEVTOOLS_MESSAGES_H_ +#define CONTENT_COMMON_DEVTOOLS_MESSAGES_H_ + +namespace IPC { + +template<> +struct ParamTraits<content::ConsoleMessageLevel> { + typedef content::ConsoleMessageLevel param_type; + static void Write(Message* m, const param_type& p); + static bool Read(const Message* m, PickleIterator* iter, param_type* r); + static void Log(const param_type& p, std::string* l); +}; + +} // namespace IPC + +#endif // CONTENT_COMMON_DEVTOOLS_MESSAGES_H_ + // These are messages sent from DevToolsAgent to DevToolsClient through the // browser. // WebKit-level transport. @@ -79,6 +98,11 @@ IPC_MESSAGE_ROUTED2(DevToolsAgentMsg_InspectElement, int /* x */, int /* y */) +// Add message to the devtools console. +IPC_MESSAGE_ROUTED2(DevToolsAgentMsg_AddMessageToConsole, + content::ConsoleMessageLevel /* level */, + std::string /* message */) + // Notifies worker devtools agent that it should pause worker context // when it starts and wait until either DevTools client is attached or // explicit resume notification is received. |