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

Side by Side Diff: content/browser/renderer_host/pepper/pepper_renderer_connection.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/renderer_host/pepper/pepper_renderer_connection.h" 5 #include "content/browser/renderer_host/pepper/pepper_renderer_connection.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "content/browser/browser_child_process_host_impl.h" 9 #include "content/browser/browser_child_process_host_impl.h"
10 #include "content/browser/ppapi_plugin_process_host.h" 10 #include "content/browser/ppapi_plugin_process_host.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 125
126 // If the message is being sent from an in-process plugin, we own the 126 // If the message is being sent from an in-process plugin, we own the
127 // BrowserPpapiHost. 127 // BrowserPpapiHost.
128 if (!host && child_process_id == 0) { 128 if (!host && child_process_id == 0) {
129 host = in_process_host_.get(); 129 host = in_process_host_.get();
130 } 130 }
131 131
132 return host; 132 return host;
133 } 133 }
134 134
135 bool PepperRendererConnection::OnMessageReceived(const IPC::Message& msg, 135 bool PepperRendererConnection::OnMessageReceived(const IPC::Message& msg) {
136 bool* message_was_ok) {
137 if (in_process_host_->GetPpapiHost()->OnMessageReceived(msg)) 136 if (in_process_host_->GetPpapiHost()->OnMessageReceived(msg))
138 return true; 137 return true;
139 138
140 bool handled = true; 139 bool handled = true;
141 IPC_BEGIN_MESSAGE_MAP_EX(PepperRendererConnection, msg, *message_was_ok) 140 IPC_BEGIN_MESSAGE_MAP(PepperRendererConnection, msg)
142 IPC_MESSAGE_HANDLER(PpapiHostMsg_CreateResourceHostsFromHost, 141 IPC_MESSAGE_HANDLER(PpapiHostMsg_CreateResourceHostsFromHost,
143 OnMsgCreateResourceHostsFromHost) 142 OnMsgCreateResourceHostsFromHost)
144 IPC_MESSAGE_HANDLER(ViewHostMsg_DidCreateInProcessInstance, 143 IPC_MESSAGE_HANDLER(ViewHostMsg_DidCreateInProcessInstance,
145 OnMsgDidCreateInProcessInstance) 144 OnMsgDidCreateInProcessInstance)
146 IPC_MESSAGE_HANDLER(ViewHostMsg_DidDeleteInProcessInstance, 145 IPC_MESSAGE_HANDLER(ViewHostMsg_DidDeleteInProcessInstance,
147 OnMsgDidDeleteInProcessInstance) 146 OnMsgDidDeleteInProcessInstance)
148 IPC_MESSAGE_UNHANDLED(handled = false) 147 IPC_MESSAGE_UNHANDLED(handled = false)
149 IPC_END_MESSAGE_MAP_EX() 148 IPC_END_MESSAGE_MAP()
150 149
151 return handled; 150 return handled;
152 } 151 }
153 152
154 void PepperRendererConnection::OnMsgCreateResourceHostsFromHost( 153 void PepperRendererConnection::OnMsgCreateResourceHostsFromHost(
155 int routing_id, 154 int routing_id,
156 int child_process_id, 155 int child_process_id,
157 const ppapi::proxy::ResourceMessageCallParams& params, 156 const ppapi::proxy::ResourceMessageCallParams& params,
158 PP_Instance instance, 157 PP_Instance instance,
159 const std::vector<IPC::Message>& nested_msgs) { 158 const std::vector<IPC::Message>& nested_msgs) {
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 data.render_process_id = render_process_id_; 228 data.render_process_id = render_process_id_;
230 in_process_host_->AddInstance(instance, data); 229 in_process_host_->AddInstance(instance, data);
231 } 230 }
232 231
233 void PepperRendererConnection::OnMsgDidDeleteInProcessInstance( 232 void PepperRendererConnection::OnMsgDidDeleteInProcessInstance(
234 PP_Instance instance) { 233 PP_Instance instance) {
235 in_process_host_->DeleteInstance(instance); 234 in_process_host_->DeleteInstance(instance);
236 } 235 }
237 236
238 } // namespace content 237 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698