| 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 #ifndef CONTENT_RENDERER_CHILD_FRAME_COMPOSITING_HELPER_H_ | 5 #ifndef CONTENT_RENDERER_CHILD_FRAME_COMPOSITING_HELPER_H_ |
| 6 #define CONTENT_RENDERER_CHILD_FRAME_COMPOSITING_HELPER_H_ | 6 #define CONTENT_RENDERER_CHILD_FRAME_COMPOSITING_HELPER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/memory/shared_memory.h" | 13 #include "base/memory/shared_memory.h" |
| 14 #include "cc/layers/delegated_frame_resource_collection.h" | 14 #include "cc/layers/delegated_frame_resource_collection.h" |
| 15 #include "content/common/content_export.h" | 15 #include "content/common/content_export.h" |
| 16 #include "ui/gfx/size.h" | 16 #include "ui/gfx/size.h" |
| 17 | 17 |
| 18 namespace base { | 18 namespace base { |
| 19 class SharedMemory; | 19 class SharedMemory; |
| 20 } | 20 } |
| 21 | 21 |
| 22 namespace cc { | 22 namespace cc { |
| 23 class CompositorFrame; | 23 class CompositorFrame; |
| 24 class CopyOutputResult; | |
| 25 class Layer; | 24 class Layer; |
| 26 class SolidColorLayer; | 25 class SolidColorLayer; |
| 27 class DelegatedFrameProvider; | 26 class DelegatedFrameProvider; |
| 28 class DelegatedFrameResourceCollection; | 27 class DelegatedFrameResourceCollection; |
| 29 class DelegatedRendererLayer; | 28 class DelegatedRendererLayer; |
| 30 } | 29 } |
| 31 | 30 |
| 32 namespace blink { | 31 namespace blink { |
| 33 class WebFrame; | 32 class WebFrame; |
| 34 class WebPluginContainer; | 33 class WebPluginContainer; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 52 | 51 |
| 53 class CONTENT_EXPORT ChildFrameCompositingHelper | 52 class CONTENT_EXPORT ChildFrameCompositingHelper |
| 54 : public base::RefCounted<ChildFrameCompositingHelper>, | 53 : public base::RefCounted<ChildFrameCompositingHelper>, |
| 55 public cc::DelegatedFrameResourceCollectionClient { | 54 public cc::DelegatedFrameResourceCollectionClient { |
| 56 public: | 55 public: |
| 57 static ChildFrameCompositingHelper* CreateForBrowserPlugin( | 56 static ChildFrameCompositingHelper* CreateForBrowserPlugin( |
| 58 const base::WeakPtr<BrowserPlugin>& browser_plugin); | 57 const base::WeakPtr<BrowserPlugin>& browser_plugin); |
| 59 static ChildFrameCompositingHelper* CreateForRenderFrameProxy( | 58 static ChildFrameCompositingHelper* CreateForRenderFrameProxy( |
| 60 RenderFrameProxy* render_frame_proxy); | 59 RenderFrameProxy* render_frame_proxy); |
| 61 | 60 |
| 62 void CopyFromCompositingSurface(int request_id, | |
| 63 gfx::Rect source_rect, | |
| 64 gfx::Size dest_size); | |
| 65 void DidCommitCompositorFrame(); | 61 void DidCommitCompositorFrame(); |
| 66 void EnableCompositing(bool); | 62 void EnableCompositing(bool); |
| 67 void OnContainerDestroy(); | 63 void OnContainerDestroy(); |
| 68 void OnCompositorFrameSwapped(scoped_ptr<cc::CompositorFrame> frame, | 64 void OnCompositorFrameSwapped(scoped_ptr<cc::CompositorFrame> frame, |
| 69 int route_id, | 65 int route_id, |
| 70 uint32 output_surface_id, | 66 uint32 output_surface_id, |
| 71 int host_id, | 67 int host_id, |
| 72 base::SharedMemoryHandle handle); | 68 base::SharedMemoryHandle handle); |
| 73 void UpdateVisibility(bool); | 69 void UpdateVisibility(bool); |
| 74 void ChildFrameGone(); | 70 void ChildFrameGone(); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 95 int GetInstanceID(); | 91 int GetInstanceID(); |
| 96 | 92 |
| 97 void SendCompositorFrameSwappedACKToBrowser( | 93 void SendCompositorFrameSwappedACKToBrowser( |
| 98 FrameHostMsg_CompositorFrameSwappedACK_Params& params); | 94 FrameHostMsg_CompositorFrameSwappedACK_Params& params); |
| 99 void SendReclaimCompositorResourcesToBrowser( | 95 void SendReclaimCompositorResourcesToBrowser( |
| 100 FrameHostMsg_ReclaimCompositorResources_Params& params); | 96 FrameHostMsg_ReclaimCompositorResources_Params& params); |
| 101 void CheckSizeAndAdjustLayerProperties(const gfx::Size& new_size, | 97 void CheckSizeAndAdjustLayerProperties(const gfx::Size& new_size, |
| 102 float device_scale_factor, | 98 float device_scale_factor, |
| 103 cc::Layer* layer); | 99 cc::Layer* layer); |
| 104 void SendReturnedDelegatedResources(); | 100 void SendReturnedDelegatedResources(); |
| 105 void CopyFromCompositingSurfaceHasResult( | |
| 106 int request_id, | |
| 107 gfx::Size dest_size, | |
| 108 scoped_ptr<cc::CopyOutputResult> result); | |
| 109 | 101 |
| 110 int host_routing_id_; | 102 int host_routing_id_; |
| 111 int last_route_id_; | 103 int last_route_id_; |
| 112 uint32 last_output_surface_id_; | 104 uint32 last_output_surface_id_; |
| 113 int last_host_id_; | 105 int last_host_id_; |
| 114 bool ack_pending_; | 106 bool ack_pending_; |
| 115 bool opaque_; | 107 bool opaque_; |
| 116 | 108 |
| 117 gfx::Size buffer_size_; | 109 gfx::Size buffer_size_; |
| 118 | 110 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 129 scoped_refptr<cc::DelegatedRendererLayer> delegated_layer_; | 121 scoped_refptr<cc::DelegatedRendererLayer> delegated_layer_; |
| 130 scoped_ptr<blink::WebLayer> web_layer_; | 122 scoped_ptr<blink::WebLayer> web_layer_; |
| 131 blink::WebFrame* frame_; | 123 blink::WebFrame* frame_; |
| 132 | 124 |
| 133 DISALLOW_COPY_AND_ASSIGN(ChildFrameCompositingHelper); | 125 DISALLOW_COPY_AND_ASSIGN(ChildFrameCompositingHelper); |
| 134 }; | 126 }; |
| 135 | 127 |
| 136 } // namespace content | 128 } // namespace content |
| 137 | 129 |
| 138 #endif // CONTENT_RENDERER_CHILD_FRAME_COMPOSITING_HELPER_H_ | 130 #endif // CONTENT_RENDERER_CHILD_FRAME_COMPOSITING_HELPER_H_ |
| OLD | NEW |