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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 292443004: Remove IPC_BEGIN_MESSAGE_MAP_EX macro since r270839 made all bad IPCs kill their child processes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 return true; 486 return true;
487 render_frame_message_source_ = render_frame_host; 487 render_frame_message_source_ = render_frame_host;
488 } else { 488 } else {
489 if (RenderViewDevToolsAgentHost::DispatchIPCMessage( 489 if (RenderViewDevToolsAgentHost::DispatchIPCMessage(
490 render_view_host, message)) 490 render_view_host, message))
491 return true; 491 return true;
492 render_view_message_source_ = render_view_host; 492 render_view_message_source_ = render_view_host;
493 } 493 }
494 494
495 bool handled = true; 495 bool handled = true;
496 bool message_is_ok = true; 496 IPC_BEGIN_MESSAGE_MAP(WebContentsImpl, message)
497 IPC_BEGIN_MESSAGE_MAP_EX(WebContentsImpl, message, message_is_ok)
498 IPC_MESSAGE_HANDLER(FrameHostMsg_PepperPluginHung, OnPepperPluginHung) 497 IPC_MESSAGE_HANDLER(FrameHostMsg_PepperPluginHung, OnPepperPluginHung)
499 IPC_MESSAGE_HANDLER(FrameHostMsg_PluginCrashed, OnPluginCrashed) 498 IPC_MESSAGE_HANDLER(FrameHostMsg_PluginCrashed, OnPluginCrashed)
500 IPC_MESSAGE_HANDLER(FrameHostMsg_DomOperationResponse, 499 IPC_MESSAGE_HANDLER(FrameHostMsg_DomOperationResponse,
501 OnDomOperationResponse) 500 OnDomOperationResponse)
502 IPC_MESSAGE_HANDLER(FrameHostMsg_DidFinishDocumentLoad, 501 IPC_MESSAGE_HANDLER(FrameHostMsg_DidFinishDocumentLoad,
503 OnDocumentLoadedInFrame) 502 OnDocumentLoadedInFrame)
504 IPC_MESSAGE_HANDLER(FrameHostMsg_DidFinishLoad, OnDidFinishLoad) 503 IPC_MESSAGE_HANDLER(FrameHostMsg_DidFinishLoad, OnDidFinishLoad)
505 IPC_MESSAGE_HANDLER(FrameHostMsg_OpenColorChooser, OnOpenColorChooser) 504 IPC_MESSAGE_HANDLER(FrameHostMsg_OpenColorChooser, OnOpenColorChooser)
506 IPC_MESSAGE_HANDLER(FrameHostMsg_EndColorChooser, OnEndColorChooser) 505 IPC_MESSAGE_HANDLER(FrameHostMsg_EndColorChooser, OnEndColorChooser)
507 IPC_MESSAGE_HANDLER(FrameHostMsg_SetSelectedColorInColorChooser, 506 IPC_MESSAGE_HANDLER(FrameHostMsg_SetSelectedColorInColorChooser,
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 OnHideValidationMessage) 539 OnHideValidationMessage)
541 IPC_MESSAGE_HANDLER(ViewHostMsg_MoveValidationMessage, 540 IPC_MESSAGE_HANDLER(ViewHostMsg_MoveValidationMessage,
542 OnMoveValidationMessage) 541 OnMoveValidationMessage)
543 #if defined(OS_ANDROID) 542 #if defined(OS_ANDROID)
544 IPC_MESSAGE_HANDLER(ViewHostMsg_FindMatchRects_Reply, 543 IPC_MESSAGE_HANDLER(ViewHostMsg_FindMatchRects_Reply,
545 OnFindMatchRectsReply) 544 OnFindMatchRectsReply)
546 IPC_MESSAGE_HANDLER(ViewHostMsg_OpenDateTimeDialog, 545 IPC_MESSAGE_HANDLER(ViewHostMsg_OpenDateTimeDialog,
547 OnOpenDateTimeDialog) 546 OnOpenDateTimeDialog)
548 #endif 547 #endif
549 IPC_MESSAGE_UNHANDLED(handled = false) 548 IPC_MESSAGE_UNHANDLED(handled = false)
550 IPC_END_MESSAGE_MAP_EX() 549 IPC_END_MESSAGE_MAP()
551 render_view_message_source_ = NULL; 550 render_view_message_source_ = NULL;
552 render_frame_message_source_ = NULL; 551 render_frame_message_source_ = NULL;
553 552
554 if (!message_is_ok) {
555 RecordAction(base::UserMetricsAction("BadMessageTerminate_RVD"));
556 GetRenderProcessHost()->ReceivedBadMessage();
557 }
558
559 return handled; 553 return handled;
560 } 554 }
561 555
562 void WebContentsImpl::RunFileChooser( 556 void WebContentsImpl::RunFileChooser(
563 RenderViewHost* render_view_host, 557 RenderViewHost* render_view_host,
564 const FileChooserParams& params) { 558 const FileChooserParams& params) {
565 if (delegate_) 559 if (delegate_)
566 delegate_->RunFileChooser(this, params); 560 delegate_->RunFileChooser(this, params);
567 } 561 }
568 562
(...skipping 3394 matching lines...) Expand 10 before | Expand all | Expand 10 after
3963 3957
3964 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { 3958 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) {
3965 if (!delegate_) 3959 if (!delegate_)
3966 return; 3960 return;
3967 const gfx::Size new_size = GetPreferredSize(); 3961 const gfx::Size new_size = GetPreferredSize();
3968 if (new_size != old_size) 3962 if (new_size != old_size)
3969 delegate_->UpdatePreferredSize(this, new_size); 3963 delegate_->UpdatePreferredSize(this, new_size);
3970 } 3964 }
3971 3965
3972 } // namespace content 3966 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/vibration/vibration_message_filter.cc ('k') | content/browser/worker_host/worker_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698