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::CreateCompositingHelperForBrowserPlugin( | 43 ChildFrameCompositingHelper::CreateForBrowserPlugin( |
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::CreateCompositingHelperForRenderFrame( | 50 ChildFrameCompositingHelper::CreateForRenderFrameProxy( |
51 blink::WebFrame* frame, | 51 RenderFrameProxy* render_frame_proxy) { |
52 RenderFrameProxy* render_frame_proxy, | 52 return new ChildFrameCompositingHelper(base::WeakPtr<BrowserPlugin>(), |
53 int host_routing_id) { | 53 render_frame_proxy->web_frame(), |
54 return new ChildFrameCompositingHelper( | 54 render_frame_proxy, |
55 base::WeakPtr<BrowserPlugin>(), frame, render_frame_proxy, | 55 render_frame_proxy->routing_id()); |
56 host_routing_id); | |
57 } | 56 } |
58 | 57 |
59 ChildFrameCompositingHelper::ChildFrameCompositingHelper( | 58 ChildFrameCompositingHelper::ChildFrameCompositingHelper( |
60 const base::WeakPtr<BrowserPlugin>& browser_plugin, | 59 const base::WeakPtr<BrowserPlugin>& browser_plugin, |
61 blink::WebFrame* frame, | 60 blink::WebFrame* frame, |
62 RenderFrameProxy* render_frame_proxy, | 61 RenderFrameProxy* render_frame_proxy, |
63 int host_routing_id) | 62 int host_routing_id) |
64 : host_routing_id_(host_routing_id), | 63 : host_routing_id_(host_routing_id), |
65 last_route_id_(0), | 64 last_route_id_(0), |
66 last_output_surface_id_(0), | 65 last_output_surface_id_(0), |
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
559 dest_size.height()); | 558 dest_size.height()); |
560 } | 559 } |
561 if (GetBrowserPluginManager()) { | 560 if (GetBrowserPluginManager()) { |
562 GetBrowserPluginManager()->Send( | 561 GetBrowserPluginManager()->Send( |
563 new BrowserPluginHostMsg_CopyFromCompositingSurfaceAck( | 562 new BrowserPluginHostMsg_CopyFromCompositingSurfaceAck( |
564 host_routing_id_, GetInstanceID(), request_id, resized_bitmap)); | 563 host_routing_id_, GetInstanceID(), request_id, resized_bitmap)); |
565 } | 564 } |
566 } | 565 } |
567 | 566 |
568 } // namespace content | 567 } // namespace content |
OLD | NEW |