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 "base/bind_helpers.h" | 5 #include "base/bind_helpers.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "content/browser/browser_plugin/browser_plugin_guest.h" | 9 #include "content/browser/browser_plugin/browser_plugin_guest.h" |
10 #include "content/browser/frame_host/render_widget_host_view_guest.h" | 10 #include "content/browser/frame_host/render_widget_host_view_guest.h" |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 int gpu_host_id) { | 169 int gpu_host_id) { |
170 if (!guest_) | 170 if (!guest_) |
171 return; | 171 return; |
172 | 172 |
173 FrameMsg_BuffersSwapped_Params guest_params; | 173 FrameMsg_BuffersSwapped_Params guest_params; |
174 guest_params.size = params.size; | 174 guest_params.size = params.size; |
175 guest_params.mailbox = params.mailbox; | 175 guest_params.mailbox = params.mailbox; |
176 guest_params.gpu_route_id = params.route_id; | 176 guest_params.gpu_route_id = params.route_id; |
177 guest_params.gpu_host_id = gpu_host_id; | 177 guest_params.gpu_host_id = gpu_host_id; |
178 guest_->SendMessageToEmbedder( | 178 guest_->SendMessageToEmbedder( |
179 new BrowserPluginMsg_BuffersSwapped(guest_->instance_id(), | 179 new BrowserPluginMsg_BuffersSwapped(guest_->browser_plugin_instance_id(), |
180 guest_params)); | 180 guest_params)); |
181 } | 181 } |
182 | 182 |
183 void RenderWidgetHostViewGuest::AcceleratedSurfacePostSubBuffer( | 183 void RenderWidgetHostViewGuest::AcceleratedSurfacePostSubBuffer( |
184 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params, | 184 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params, |
185 int gpu_host_id) { | 185 int gpu_host_id) { |
186 NOTREACHED(); | 186 NOTREACHED(); |
187 } | 187 } |
188 | 188 |
189 void RenderWidgetHostViewGuest::OnSwapCompositorFrame( | 189 void RenderWidgetHostViewGuest::OnSwapCompositorFrame( |
(...skipping 26 matching lines...) Expand all Loading... |
216 } | 216 } |
217 | 217 |
218 FrameMsg_CompositorFrameSwapped_Params guest_params; | 218 FrameMsg_CompositorFrameSwapped_Params guest_params; |
219 frame->AssignTo(&guest_params.frame); | 219 frame->AssignTo(&guest_params.frame); |
220 guest_params.output_surface_id = output_surface_id; | 220 guest_params.output_surface_id = output_surface_id; |
221 guest_params.producing_route_id = host_->GetRoutingID(); | 221 guest_params.producing_route_id = host_->GetRoutingID(); |
222 guest_params.producing_host_id = host_->GetProcess()->GetID(); | 222 guest_params.producing_host_id = host_->GetProcess()->GetID(); |
223 guest_params.shared_memory_handle = software_frame_handle; | 223 guest_params.shared_memory_handle = software_frame_handle; |
224 | 224 |
225 guest_->SendMessageToEmbedder( | 225 guest_->SendMessageToEmbedder( |
226 new BrowserPluginMsg_CompositorFrameSwapped(guest_->instance_id(), | 226 new BrowserPluginMsg_CompositorFrameSwapped( |
227 guest_params)); | 227 guest_->browser_plugin_instance_id(), guest_params)); |
228 } | 228 } |
229 | 229 |
230 bool RenderWidgetHostViewGuest::OnMessageReceived(const IPC::Message& msg) { | 230 bool RenderWidgetHostViewGuest::OnMessageReceived(const IPC::Message& msg) { |
231 return platform_view_->OnMessageReceived(msg); | 231 return platform_view_->OnMessageReceived(msg); |
232 } | 232 } |
233 | 233 |
234 void RenderWidgetHostViewGuest::InitAsChild( | 234 void RenderWidgetHostViewGuest::InitAsChild( |
235 gfx::NativeView parent_view) { | 235 gfx::NativeView parent_view) { |
236 platform_view_->InitAsChild(parent_view); | 236 platform_view_->InitAsChild(parent_view); |
237 } | 237 } |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
552 return kN32_SkColorType; | 552 return kN32_SkColorType; |
553 } | 553 } |
554 | 554 |
555 RenderWidgetHostViewBase* | 555 RenderWidgetHostViewBase* |
556 RenderWidgetHostViewGuest::GetGuestRenderWidgetHostView() const { | 556 RenderWidgetHostViewGuest::GetGuestRenderWidgetHostView() const { |
557 return static_cast<RenderWidgetHostViewBase*>( | 557 return static_cast<RenderWidgetHostViewBase*>( |
558 guest_->GetEmbedderRenderWidgetHostView()); | 558 guest_->GetEmbedderRenderWidgetHostView()); |
559 } | 559 } |
560 | 560 |
561 } // namespace content | 561 } // namespace content |
OLD | NEW |