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

Side by Side Diff: content/browser/renderer_host/gpu_message_filter.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 #if defined(OS_WIN) 5 #if defined(OS_WIN)
6 #include <windows.h> 6 #include <windows.h>
7 #endif 7 #endif
8 8
9 #include "content/browser/renderer_host/gpu_message_filter.h" 9 #include "content/browser/renderer_host/gpu_message_filter.h"
10 10
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 render_widget_helper_(render_widget_helper), 60 render_widget_helper_(render_widget_helper),
61 weak_ptr_factory_(this) { 61 weak_ptr_factory_(this) {
62 DCHECK_CURRENTLY_ON(BrowserThread::UI); 62 DCHECK_CURRENTLY_ON(BrowserThread::UI);
63 } 63 }
64 64
65 GpuMessageFilter::~GpuMessageFilter() { 65 GpuMessageFilter::~GpuMessageFilter() {
66 DCHECK_CURRENTLY_ON(BrowserThread::IO); 66 DCHECK_CURRENTLY_ON(BrowserThread::IO);
67 EndAllFrameSubscriptions(); 67 EndAllFrameSubscriptions();
68 } 68 }
69 69
70 bool GpuMessageFilter::OnMessageReceived( 70 bool GpuMessageFilter::OnMessageReceived(const IPC::Message& message) {
71 const IPC::Message& message,
72 bool* message_was_ok) {
73 bool handled = true; 71 bool handled = true;
74 IPC_BEGIN_MESSAGE_MAP_EX(GpuMessageFilter, message, *message_was_ok) 72 IPC_BEGIN_MESSAGE_MAP(GpuMessageFilter, message)
75 IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuHostMsg_EstablishGpuChannel, 73 IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuHostMsg_EstablishGpuChannel,
76 OnEstablishGpuChannel) 74 OnEstablishGpuChannel)
77 IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuHostMsg_CreateViewCommandBuffer, 75 IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuHostMsg_CreateViewCommandBuffer,
78 OnCreateViewCommandBuffer) 76 OnCreateViewCommandBuffer)
79 IPC_MESSAGE_UNHANDLED(handled = false) 77 IPC_MESSAGE_UNHANDLED(handled = false)
80 IPC_END_MESSAGE_MAP_EX() 78 IPC_END_MESSAGE_MAP()
81 return handled; 79 return handled;
82 } 80 }
83 81
84 void GpuMessageFilter::BeginFrameSubscription( 82 void GpuMessageFilter::BeginFrameSubscription(
85 int route_id, 83 int route_id,
86 scoped_ptr<RenderWidgetHostViewFrameSubscriber> subscriber) { 84 scoped_ptr<RenderWidgetHostViewFrameSubscriber> subscriber) {
87 DCHECK_CURRENTLY_ON(BrowserThread::IO); 85 DCHECK_CURRENTLY_ON(BrowserThread::IO);
88 linked_ptr<FrameSubscription> subscription( 86 linked_ptr<FrameSubscription> subscription(
89 new FrameSubscription(route_id, subscriber.Pass())); 87 new FrameSubscription(route_id, subscriber.Pass()));
90 BeginFrameSubscriptionInternal(subscription); 88 BeginFrameSubscriptionInternal(subscription);
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 // so it is not necessary to end it. 256 // so it is not necessary to end it.
259 if (!host || !subscription->surface_id) 257 if (!host || !subscription->surface_id)
260 return; 258 return;
261 259
262 // Note that GpuProcessHost here might not be the same one that frame 260 // Note that GpuProcessHost here might not be the same one that frame
263 // subscription has applied. 261 // subscription has applied.
264 host->EndFrameSubscription(subscription->surface_id); 262 host->EndFrameSubscription(subscription->surface_id);
265 } 263 }
266 264
267 } // namespace content 265 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/gpu_message_filter.h ('k') | content/browser/renderer_host/input/input_router_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698