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

Unified Diff: chrome/renderer/render_view.cc

Issue 5978003: Make IPC::Channel::Listener:OnMessageReceived have a return value indicating ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years 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/renderer/render_view.h ('k') | chrome/renderer/render_widget.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/render_view.cc
===================================================================
--- chrome/renderer/render_view.cc (revision 70108)
+++ chrome/renderer/render_view.cc (working copy)
@@ -944,31 +944,32 @@
render_thread_->AddFilter(audio_message_filter_);
}
-void RenderView::OnMessageReceived(const IPC::Message& message) {
+bool RenderView::OnMessageReceived(const IPC::Message& message) {
WebFrame* main_frame = webview() ? webview()->mainFrame() : NULL;
if (main_frame)
child_process_logging::SetActiveURL(main_frame->url());
// If this is developer tools renderer intercept tools messages first.
if (devtools_client_.get() && devtools_client_->OnMessageReceived(message))
- return;
+ return true;
if (devtools_agent_.get() && devtools_agent_->OnMessageReceived(message))
- return;
+ return true;
if (notification_provider_->OnMessageReceived(message))
- return;
+ return true;
if (geolocation_dispatcher_.get() &&
geolocation_dispatcher_->OnMessageReceived(message)) {
- return;
+ return true;
}
if (speech_input_dispatcher_.get() &&
speech_input_dispatcher_->OnMessageReceived(message)) {
- return;
+ return true;
}
if (device_orientation_dispatcher_.get() &&
device_orientation_dispatcher_->OnMessageReceived(message)) {
- return;
+ return true;
}
+ bool handled = true;
IPC_BEGIN_MESSAGE_MAP(RenderView, message)
IPC_MESSAGE_HANDLER(ViewMsg_CaptureThumbnail, OnCaptureThumbnail)
IPC_MESSAGE_HANDLER(ViewMsg_CaptureSnapshot, OnCaptureSnapshot)
@@ -1102,8 +1103,9 @@
IPC_MESSAGE_HANDLER(ViewMsg_PrintPreview, OnPrintPreview)
// Have the super handle all other messages.
- IPC_MESSAGE_UNHANDLED(RenderWidget::OnMessageReceived(message))
+ IPC_MESSAGE_UNHANDLED(handled = RenderWidget::OnMessageReceived(message))
IPC_END_MESSAGE_MAP()
+ return handled;
}
void RenderView::OnCaptureThumbnail() {
« no previous file with comments | « chrome/renderer/render_view.h ('k') | chrome/renderer/render_widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698