| 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/renderer/child_frame_compositing_helper.h" | 5 #include "content/renderer/child_frame_compositing_helper.h" |
| 6 | 6 |
| 7 #include "cc/layers/delegated_frame_provider.h" | 7 #include "cc/layers/delegated_frame_provider.h" |
| 8 #include "cc/layers/delegated_frame_resource_collection.h" | 8 #include "cc/layers/delegated_frame_resource_collection.h" |
| 9 #include "cc/layers/delegated_renderer_layer.h" | 9 #include "cc/layers/delegated_renderer_layer.h" |
| 10 #include "cc/layers/solid_color_layer.h" | 10 #include "cc/layers/solid_color_layer.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 namespace content { | 33 namespace content { |
| 34 | 34 |
| 35 ChildFrameCompositingHelper::SwapBuffersInfo::SwapBuffersInfo() | 35 ChildFrameCompositingHelper::SwapBuffersInfo::SwapBuffersInfo() |
| 36 : route_id(0), | 36 : route_id(0), |
| 37 output_surface_id(0), | 37 output_surface_id(0), |
| 38 host_id(0), | 38 host_id(0), |
| 39 software_frame_id(0), | 39 software_frame_id(0), |
| 40 shared_memory(NULL) {} | 40 shared_memory(NULL) {} |
| 41 | 41 |
| 42 ChildFrameCompositingHelper* | 42 ChildFrameCompositingHelper* |
| 43 ChildFrameCompositingHelper::CreateForBrowserPlugin( | 43 ChildFrameCompositingHelper::CreateCompositingHelperForBrowserPlugin( |
| 44 const base::WeakPtr<BrowserPlugin>& browser_plugin) { | 44 const base::WeakPtr<BrowserPlugin>& browser_plugin) { |
| 45 return new ChildFrameCompositingHelper( | 45 return new ChildFrameCompositingHelper( |
| 46 browser_plugin, NULL, NULL, browser_plugin->render_view_routing_id()); | 46 browser_plugin, NULL, NULL, browser_plugin->render_view_routing_id()); |
| 47 } | 47 } |
| 48 | 48 |
| 49 ChildFrameCompositingHelper* | 49 ChildFrameCompositingHelper* |
| 50 ChildFrameCompositingHelper::CreateForRenderFrameProxy( | 50 ChildFrameCompositingHelper::CreateCompositingHelperForRenderFrame( |
| 51 RenderFrameProxy* render_frame_proxy) { | 51 blink::WebFrame* frame, |
| 52 return new ChildFrameCompositingHelper(base::WeakPtr<BrowserPlugin>(), | 52 RenderFrameProxy* render_frame_proxy, |
| 53 render_frame_proxy->web_frame(), | 53 int host_routing_id) { |
| 54 render_frame_proxy, | 54 return new ChildFrameCompositingHelper( |
| 55 render_frame_proxy->routing_id()); | 55 base::WeakPtr<BrowserPlugin>(), frame, render_frame_proxy, |
| 56 host_routing_id); |
| 56 } | 57 } |
| 57 | 58 |
| 58 ChildFrameCompositingHelper::ChildFrameCompositingHelper( | 59 ChildFrameCompositingHelper::ChildFrameCompositingHelper( |
| 59 const base::WeakPtr<BrowserPlugin>& browser_plugin, | 60 const base::WeakPtr<BrowserPlugin>& browser_plugin, |
| 60 blink::WebFrame* frame, | 61 blink::WebFrame* frame, |
| 61 RenderFrameProxy* render_frame_proxy, | 62 RenderFrameProxy* render_frame_proxy, |
| 62 int host_routing_id) | 63 int host_routing_id) |
| 63 : host_routing_id_(host_routing_id), | 64 : host_routing_id_(host_routing_id), |
| 64 last_route_id_(0), | 65 last_route_id_(0), |
| 65 last_output_surface_id_(0), | 66 last_output_surface_id_(0), |
| (...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 558 dest_size.height()); | 559 dest_size.height()); |
| 559 } | 560 } |
| 560 if (GetBrowserPluginManager()) { | 561 if (GetBrowserPluginManager()) { |
| 561 GetBrowserPluginManager()->Send( | 562 GetBrowserPluginManager()->Send( |
| 562 new BrowserPluginHostMsg_CopyFromCompositingSurfaceAck( | 563 new BrowserPluginHostMsg_CopyFromCompositingSurfaceAck( |
| 563 host_routing_id_, GetInstanceID(), request_id, resized_bitmap)); | 564 host_routing_id_, GetInstanceID(), request_id, resized_bitmap)); |
| 564 } | 565 } |
| 565 } | 566 } |
| 566 | 567 |
| 567 } // namespace content | 568 } // namespace content |
| OLD | NEW |