OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/frame_host/cross_process_frame_connector.h" | 5 #include "content/browser/frame_host/cross_process_frame_connector.h" |
6 | 6 |
7 #include "content/browser/frame_host/render_frame_host_impl.h" | 7 #include "content/browser/frame_host/render_frame_host_impl.h" |
8 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" | 8 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" |
9 #include "content/browser/renderer_host/render_view_host_impl.h" | 9 #include "content/browser/renderer_host/render_view_host_impl.h" |
10 #include "content/browser/renderer_host/render_widget_host_impl.h" | 10 #include "content/browser/renderer_host/render_widget_host_impl.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 frame_proxy_in_parent_renderer_->Send(new FrameMsg_ChildFrameProcessGone( | 60 frame_proxy_in_parent_renderer_->Send(new FrameMsg_ChildFrameProcessGone( |
61 frame_proxy_in_parent_renderer_->routing_id())); | 61 frame_proxy_in_parent_renderer_->routing_id())); |
62 } | 62 } |
63 | 63 |
64 void CrossProcessFrameConnector::ChildFrameBuffersSwapped( | 64 void CrossProcessFrameConnector::ChildFrameBuffersSwapped( |
65 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& gpu_params, | 65 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& gpu_params, |
66 int gpu_host_id) { | 66 int gpu_host_id) { |
67 | 67 |
68 FrameMsg_BuffersSwapped_Params params; | 68 FrameMsg_BuffersSwapped_Params params; |
69 params.size = gpu_params.size; | 69 params.size = gpu_params.size; |
70 params.mailbox = gpu_params.mailbox; | 70 params.mailbox_name = gpu_params.mailbox_name; |
71 params.gpu_route_id = gpu_params.route_id; | 71 params.gpu_route_id = gpu_params.route_id; |
72 params.gpu_host_id = gpu_host_id; | 72 params.gpu_host_id = gpu_host_id; |
73 | 73 |
74 frame_proxy_in_parent_renderer_->Send( | 74 frame_proxy_in_parent_renderer_->Send( |
75 new FrameMsg_BuffersSwapped( | 75 new FrameMsg_BuffersSwapped( |
76 frame_proxy_in_parent_renderer_->routing_id(), | 76 frame_proxy_in_parent_renderer_->routing_id(), |
77 params)); | 77 params)); |
78 } | 78 } |
79 | 79 |
80 void CrossProcessFrameConnector::ChildFrameCompositorFrameSwapped( | 80 void CrossProcessFrameConnector::ChildFrameCompositorFrameSwapped( |
81 uint32 output_surface_id, | 81 uint32 output_surface_id, |
82 int host_id, | 82 int host_id, |
83 int route_id, | 83 int route_id, |
84 scoped_ptr<cc::CompositorFrame> frame) { | 84 scoped_ptr<cc::CompositorFrame> frame) { |
85 FrameMsg_CompositorFrameSwapped_Params params; | 85 FrameMsg_CompositorFrameSwapped_Params params; |
86 frame->AssignTo(¶ms.frame); | 86 frame->AssignTo(¶ms.frame); |
87 params.output_surface_id = output_surface_id; | 87 params.output_surface_id = output_surface_id; |
88 params.producing_route_id = route_id; | 88 params.producing_route_id = route_id; |
89 params.producing_host_id = host_id; | 89 params.producing_host_id = host_id; |
90 frame_proxy_in_parent_renderer_->Send(new FrameMsg_CompositorFrameSwapped( | 90 frame_proxy_in_parent_renderer_->Send(new FrameMsg_CompositorFrameSwapped( |
91 frame_proxy_in_parent_renderer_->routing_id(), params)); | 91 frame_proxy_in_parent_renderer_->routing_id(), params)); |
92 } | 92 } |
93 | 93 |
94 void CrossProcessFrameConnector::OnBuffersSwappedACK( | 94 void CrossProcessFrameConnector::OnBuffersSwappedACK( |
95 const FrameHostMsg_BuffersSwappedACK_Params& params) { | 95 const FrameHostMsg_BuffersSwappedACK_Params& params) { |
96 AcceleratedSurfaceMsg_BufferPresented_Params ack_params; | 96 AcceleratedSurfaceMsg_BufferPresented_Params ack_params; |
97 ack_params.mailbox = params.mailbox; | 97 ack_params.mailbox_name = params.mailbox_name; |
98 ack_params.sync_point = params.sync_point; | 98 ack_params.sync_point = params.sync_point; |
99 RenderWidgetHostImpl::AcknowledgeBufferPresent(params.gpu_route_id, | 99 RenderWidgetHostImpl::AcknowledgeBufferPresent(params.gpu_route_id, |
100 params.gpu_host_id, | 100 params.gpu_host_id, |
101 ack_params); | 101 ack_params); |
102 | 102 |
103 // TODO(kenrb): Special case stuff for Win + Mac. | 103 // TODO(kenrb): Special case stuff for Win + Mac. |
104 } | 104 } |
105 | 105 |
106 void CrossProcessFrameConnector::OnCompositorFrameSwappedACK( | 106 void CrossProcessFrameConnector::OnCompositorFrameSwappedACK( |
107 const FrameHostMsg_CompositorFrameSwappedACK_Params& params) { | 107 const FrameHostMsg_CompositorFrameSwappedACK_Params& params) { |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 } | 149 } |
150 | 150 |
151 if (event->type == blink::WebInputEvent::MouseWheel) { | 151 if (event->type == blink::WebInputEvent::MouseWheel) { |
152 child_widget->ForwardWheelEvent( | 152 child_widget->ForwardWheelEvent( |
153 *static_cast<const blink::WebMouseWheelEvent*>(event)); | 153 *static_cast<const blink::WebMouseWheelEvent*>(event)); |
154 return; | 154 return; |
155 } | 155 } |
156 } | 156 } |
157 | 157 |
158 } // namespace content | 158 } // namespace content |
OLD | NEW |