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

Side by Side Diff: content/public/test/mock_render_thread.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
« no previous file with comments | « content/public/browser/browser_message_filter.cc ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/public/test/mock_render_thread.h" 5 #include "content/public/test/mock_render_thread.h"
6 6
7 #include "base/message_loop/message_loop_proxy.h" 7 #include "base/message_loop/message_loop_proxy.h"
8 #include "content/common/frame_messages.h" 8 #include "content/common/frame_messages.h"
9 #include "content/common/view_messages.h" 9 #include "content/common/view_messages.h"
10 #include "content/public/renderer/render_process_observer.h" 10 #include "content/public/renderer/render_process_observer.h"
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 return true; 231 return true;
232 } 232 }
233 return OnMessageReceived(msg); 233 return OnMessageReceived(msg);
234 } 234 }
235 235
236 bool MockRenderThread::OnMessageReceived(const IPC::Message& msg) { 236 bool MockRenderThread::OnMessageReceived(const IPC::Message& msg) {
237 // Save the message in the sink. 237 // Save the message in the sink.
238 sink_.OnMessageReceived(msg); 238 sink_.OnMessageReceived(msg);
239 239
240 bool handled = true; 240 bool handled = true;
241 bool msg_is_ok = true; 241 IPC_BEGIN_MESSAGE_MAP(MockRenderThread, msg)
242 IPC_BEGIN_MESSAGE_MAP_EX(MockRenderThread, msg, msg_is_ok)
243 IPC_MESSAGE_HANDLER(ViewHostMsg_CreateWidget, OnCreateWidget) 242 IPC_MESSAGE_HANDLER(ViewHostMsg_CreateWidget, OnCreateWidget)
244 IPC_MESSAGE_HANDLER(ViewHostMsg_CreateWindow, OnCreateWindow) 243 IPC_MESSAGE_HANDLER(ViewHostMsg_CreateWindow, OnCreateWindow)
245 IPC_MESSAGE_HANDLER(FrameHostMsg_CreateChildFrame, OnCreateChildFrame) 244 IPC_MESSAGE_HANDLER(FrameHostMsg_CreateChildFrame, OnCreateChildFrame)
246 IPC_MESSAGE_UNHANDLED(handled = false) 245 IPC_MESSAGE_UNHANDLED(handled = false)
247 IPC_END_MESSAGE_MAP_EX() 246 IPC_END_MESSAGE_MAP()
248 return handled; 247 return handled;
249 } 248 }
250 249
251 #if defined(OS_WIN) 250 #if defined(OS_WIN)
252 void MockRenderThread::OnDuplicateSection( 251 void MockRenderThread::OnDuplicateSection(
253 base::SharedMemoryHandle renderer_handle, 252 base::SharedMemoryHandle renderer_handle,
254 base::SharedMemoryHandle* browser_handle) { 253 base::SharedMemoryHandle* browser_handle) {
255 // We don't have to duplicate the input handles since RenderViewTest does not 254 // We don't have to duplicate the input handles since RenderViewTest does not
256 // separate a browser process from a renderer process. 255 // separate a browser process from a renderer process.
257 *browser_handle = renderer_handle; 256 *browser_handle = renderer_handle;
258 } 257 }
259 #endif // defined(OS_WIN) 258 #endif // defined(OS_WIN)
260 259
261 } // namespace content 260 } // namespace content
OLDNEW
« no previous file with comments | « content/public/browser/browser_message_filter.cc ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698