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

Side by Side Diff: content/browser/frame_host/cross_process_frame_connector.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/frame_host/cross_process_frame_connector.h" 5 #include "content/browser/frame_host/cross_process_frame_connector.h"
6 6
7 #include "content/browser/frame_host/render_frame_host_impl.h" 7 #include "content/browser/frame_host/render_frame_host_impl.h"
8 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" 8 #include "content/browser/frame_host/render_widget_host_view_child_frame.h"
9 #include "content/browser/renderer_host/render_view_host_impl.h" 9 #include "content/browser/renderer_host/render_view_host_impl.h"
10 #include "content/browser/renderer_host/render_widget_host_impl.h" 10 #include "content/browser/renderer_host/render_widget_host_impl.h"
(...skipping 11 matching lines...) Expand all
22 frame_proxy_in_parent_renderer->set_cross_process_frame_connector(this); 22 frame_proxy_in_parent_renderer->set_cross_process_frame_connector(this);
23 } 23 }
24 24
25 CrossProcessFrameConnector::~CrossProcessFrameConnector() { 25 CrossProcessFrameConnector::~CrossProcessFrameConnector() {
26 if (view_) 26 if (view_)
27 view_->set_cross_process_frame_connector(NULL); 27 view_->set_cross_process_frame_connector(NULL);
28 } 28 }
29 29
30 bool CrossProcessFrameConnector::OnMessageReceived(const IPC::Message& msg) { 30 bool CrossProcessFrameConnector::OnMessageReceived(const IPC::Message& msg) {
31 bool handled = true; 31 bool handled = true;
32 bool msg_is_ok = true;
33 32
34 IPC_BEGIN_MESSAGE_MAP_EX(CrossProcessFrameConnector, msg, msg_is_ok) 33 IPC_BEGIN_MESSAGE_MAP(CrossProcessFrameConnector, msg)
35 IPC_MESSAGE_HANDLER(FrameHostMsg_BuffersSwappedACK, OnBuffersSwappedACK) 34 IPC_MESSAGE_HANDLER(FrameHostMsg_BuffersSwappedACK, OnBuffersSwappedACK)
36 IPC_MESSAGE_HANDLER(FrameHostMsg_CompositorFrameSwappedACK, 35 IPC_MESSAGE_HANDLER(FrameHostMsg_CompositorFrameSwappedACK,
37 OnCompositorFrameSwappedACK) 36 OnCompositorFrameSwappedACK)
38 IPC_MESSAGE_HANDLER(FrameHostMsg_ReclaimCompositorResources, 37 IPC_MESSAGE_HANDLER(FrameHostMsg_ReclaimCompositorResources,
39 OnReclaimCompositorResources) 38 OnReclaimCompositorResources)
40 IPC_MESSAGE_HANDLER(FrameHostMsg_ForwardInputEvent, OnForwardInputEvent) 39 IPC_MESSAGE_HANDLER(FrameHostMsg_ForwardInputEvent, OnForwardInputEvent)
41 IPC_MESSAGE_HANDLER(FrameHostMsg_InitializeChildFrame, 40 IPC_MESSAGE_HANDLER(FrameHostMsg_InitializeChildFrame,
42 OnInitializeChildFrame) 41 OnInitializeChildFrame)
43 IPC_MESSAGE_UNHANDLED(handled = false) 42 IPC_MESSAGE_UNHANDLED(handled = false)
44 IPC_END_MESSAGE_MAP_EX() 43 IPC_END_MESSAGE_MAP()
45 44
46 return handled; 45 return handled;
47 } 46 }
48 47
49 void CrossProcessFrameConnector::set_view( 48 void CrossProcessFrameConnector::set_view(
50 RenderWidgetHostViewChildFrame* view) { 49 RenderWidgetHostViewChildFrame* view) {
51 // Detach ourselves from the previous |view_|. 50 // Detach ourselves from the previous |view_|.
52 if (view_) 51 if (view_)
53 view_->set_cross_process_frame_connector(NULL); 52 view_->set_cross_process_frame_connector(NULL);
54 53
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 } 169 }
171 170
172 if (event->type == blink::WebInputEvent::MouseWheel) { 171 if (event->type == blink::WebInputEvent::MouseWheel) {
173 child_widget->ForwardWheelEvent( 172 child_widget->ForwardWheelEvent(
174 *static_cast<const blink::WebMouseWheelEvent*>(event)); 173 *static_cast<const blink::WebMouseWheelEvent*>(event));
175 return; 174 return;
176 } 175 }
177 } 176 }
178 177
179 } // namespace content 178 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/fileapi/fileapi_message_filter_unittest.cc ('k') | content/browser/frame_host/interstitial_page_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698