Chromium Code Reviews| 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 51726338843c3ff377a1d2e486b158e1b83749da..3cdd0c0287da1cb5e1fbba3e9d5c6ad002dee51a 100644 |
| --- a/content/browser/renderer_host/render_widget_host_impl.cc |
| +++ b/content/browser/renderer_host/render_widget_host_impl.cc |
| @@ -463,6 +463,7 @@ bool RenderWidgetHostImpl::OnMessageReceived(const IPC::Message &msg) { |
| IPC_MESSAGE_HANDLER(ViewHostMsg_SetTooltipText, OnSetTooltipText) |
| IPC_MESSAGE_HANDLER_GENERIC(ViewHostMsg_SwapCompositorFrame, |
| msg_is_ok = OnSwapCompositorFrame(msg)) |
| + IPC_MESSAGE_HANDLER(ViewHostMsg_DeliverPayload, OnDeliverPayload) |
| IPC_MESSAGE_HANDLER(ViewHostMsg_DidStopFlinging, OnFlingingStopped) |
| IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateRect, OnUpdateRect) |
| IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateIsDelayed, OnUpdateIsDelayed) |
| @@ -1486,6 +1487,11 @@ bool RenderWidgetHostImpl::OnSwapCompositorFrame( |
| uint32 output_surface_id = param.a; |
| param.b.AssignTo(frame.get()); |
| + for (int i = 0; i < frame->metadata.payload.size(); ++i) { |
| + OnDeliverPayload(frame->metadata.payload[i]); |
|
mkosiba (inactive)
2014/05/06 22:30:33
the receiving end on browser side
|
| + } |
| + frame->metadata.payload.clear(); |
| + |
| for (size_t i = 0; i < frame->metadata.latency_info.size(); i++) |
| AddLatencyInfoComponentIds(&frame->metadata.latency_info[i]); |
| @@ -1513,6 +1519,12 @@ bool RenderWidgetHostImpl::OnSwapCompositorFrame( |
| return true; |
| } |
| +void RenderWidgetHostImpl::OnDeliverPayload(const IPC::Message& payload) { |
| + // Filter any RenderWidgetHostImpl-specific messages here. |
| + if (delegate_) |
| + delegate_->DispatchMessageWithSwapFrame(payload); |
| +} |
| + |
| void RenderWidgetHostImpl::OnFlingingStopped() { |
| if (view_) |
| view_->DidStopFlinging(); |