Chromium Code Reviews| Index: content/browser/plugin_process_host.cc |
| diff --git a/content/browser/plugin_process_host.cc b/content/browser/plugin_process_host.cc |
| index 23cac73d8e36c9333c7d9efa6f582dbae2f01755..2c1804a85672711347d81713866759a76da9c16c 100644 |
| --- a/content/browser/plugin_process_host.cc |
| +++ b/content/browser/plugin_process_host.cc |
| @@ -32,6 +32,7 @@ |
| #include "content/public/browser/content_browser_client.h" |
| #include "content/public/browser/notification_types.h" |
| #include "content/public/browser/plugin_service.h" |
| +#include "content/public/common/content_debug_logging.h" |
| #include "content/public/common/content_switches.h" |
| #include "content/public/common/process_type.h" |
| #include "ipc/ipc_switches.h" |
| @@ -333,6 +334,8 @@ bool PluginProcessHost::OnMessageReceived(const IPC::Message& msg) { |
| IPC_MESSAGE_HANDLER(PluginProcessHostMsg_PluginSetCursorVisibility, |
| OnPluginSetCursorVisibility) |
| #endif |
| + IPC_MESSAGE_HANDLER(PluginProcessHostMsg_RecordMsg, OnRecordMsg) |
| + IPC_MESSAGE_HANDLER(PluginProcessHostMsg_GetMessages, OnGetMessages) |
| IPC_MESSAGE_UNHANDLED(handled = false) |
| IPC_END_MESSAGE_MAP() |
| @@ -454,3 +457,14 @@ void PluginProcessHost::OnChannelCreated( |
| client->OnChannelOpened(channel_handle); |
| sent_requests_.pop_front(); |
| } |
| + |
| +// TODO(shess): Could this be annotated WRT the sending plugin? |
| +void PluginProcessHost::OnRecordMsg(int bug_id, const std::string& msg) { |
| + content::debug::RecordMsg(bug_id, msg); |
| +} |
| + |
| +void PluginProcessHost::OnGetMessages(int bug_id, |
| + std::vector<std::string>* msgs) { |
| + if (!content::debug::GetMessages(bug_id, msgs)) |
|
Bernhard Bauer
2012/09/05 15:04:55
Doesn't GetMessages() return false if the out vect
Scott Hess - ex-Googler
2012/09/05 17:17:05
GetMessages() returns false if there is no handler
|
| + msgs->clear(); |
| +} |