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

Unified Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 240163005: Deliver IPC messages together with SwapCompositorFrame (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more style fixes Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_widget_host_impl.cc
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 806b0caaaedb9f0d798c268cc5641f0ac6ab2ed9..28bb051ca9ad13799b2ba6106622fa3b13ace2c5 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -1462,6 +1462,8 @@ bool RenderWidgetHostImpl::OnSwapCompositorFrame(
scoped_ptr<cc::CompositorFrame> frame(new cc::CompositorFrame);
uint32 output_surface_id = param.a;
param.b.AssignTo(frame.get());
+ std::vector<IPC::Message> messages_to_deliver_with_frame;
+ messages_to_deliver_with_frame.swap(param.c);
for (size_t i = 0; i < frame->metadata.latency_info.size(); i++)
AddLatencyInfoComponentIds(&frame->metadata.latency_info[i]);
@@ -1487,6 +1489,16 @@ bool RenderWidgetHostImpl::OnSwapCompositorFrame(
SendSwapCompositorFrameAck(routing_id_, output_surface_id,
process_->GetID(), ack);
}
+
+ RenderProcessHost* rph = GetProcess();
+ for (std::vector<IPC::Message>::const_iterator i =
+ messages_to_deliver_with_frame.begin();
+ i != messages_to_deliver_with_frame.end();
+ ++i) {
+ rph->OnMessageReceived(*i);
Tom Sepez 2014/07/02 17:56:04 You should check if the message was handled, calli
jam 2014/07/02 20:10:54 In general, not handling IPCs is not considered an
mkosiba (inactive) 2014/07/03 15:47:32 Done.
+ }
+ messages_to_deliver_with_frame.clear();
+
return true;
}

Powered by Google App Engine
This is Rietveld 408576698