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

Side by Side Diff: content/browser/browser_plugin/browser_plugin_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 #include "content/browser/browser_plugin/browser_plugin_message_filter.h" 5 #include "content/browser/browser_plugin/browser_plugin_message_filter.h"
6 6
7 #include "base/supports_user_data.h" 7 #include "base/supports_user_data.h"
8 #include "content/browser/browser_plugin/browser_plugin_guest.h" 8 #include "content/browser/browser_plugin/browser_plugin_guest.h"
9 #include "content/browser/gpu/gpu_process_host.h" 9 #include "content/browser/gpu/gpu_process_host.h"
10 #include "content/browser/web_contents/web_contents_impl.h" 10 #include "content/browser/web_contents/web_contents_impl.h"
(...skipping 13 matching lines...) Expand all
24 : BrowserMessageFilter(BrowserPluginMsgStart), 24 : BrowserMessageFilter(BrowserPluginMsgStart),
25 render_process_id_(render_process_id), 25 render_process_id_(render_process_id),
26 is_guest_(is_guest) { 26 is_guest_(is_guest) {
27 } 27 }
28 28
29 BrowserPluginMessageFilter::~BrowserPluginMessageFilter() { 29 BrowserPluginMessageFilter::~BrowserPluginMessageFilter() {
30 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 30 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
31 } 31 }
32 32
33 bool BrowserPluginMessageFilter::OnMessageReceived( 33 bool BrowserPluginMessageFilter::OnMessageReceived(
34 const IPC::Message& message, 34 const IPC::Message& message) {
35 bool* message_was_ok) {
36 // Any message requested by a BrowserPluginGuest should be routed through 35 // Any message requested by a BrowserPluginGuest should be routed through
37 // a BrowserPluginGuestManager. 36 // a BrowserPluginGuestManager.
38 if (BrowserPluginGuest::ShouldForwardToBrowserPluginGuest(message)) { 37 if (BrowserPluginGuest::ShouldForwardToBrowserPluginGuest(message)) {
39 ForwardMessageToGuest(message); 38 ForwardMessageToGuest(message);
40 // We always swallow messages destined for BrowserPluginGuestManager because 39 // We always swallow messages destined for BrowserPluginGuestManager because
41 // we're on the UI thread and fallback code is expected to be run on the IO 40 // we're on the UI thread and fallback code is expected to be run on the IO
42 // thread. 41 // thread.
43 return true; 42 return true;
44 } 43 }
45 bool handled = true; 44 bool handled = true;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 if (!gpu_host) 96 if (!gpu_host)
98 return; 97 return;
99 AcceleratedSurfaceMsg_BufferPresented_Params ack_params; 98 AcceleratedSurfaceMsg_BufferPresented_Params ack_params;
100 ack_params.mailbox = params.mailbox; 99 ack_params.mailbox = params.mailbox;
101 ack_params.sync_point = params.sync_point; 100 ack_params.sync_point = params.sync_point;
102 gpu_host->Send(new AcceleratedSurfaceMsg_BufferPresented(params.gpu_route_id, 101 gpu_host->Send(new AcceleratedSurfaceMsg_BufferPresented(params.gpu_route_id,
103 ack_params)); 102 ack_params));
104 } 103 }
105 104
106 } // namespace content 105 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698