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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
16 #include "base/memory/shared_memory.h" | 16 #include "base/memory/shared_memory.h" |
17 #include "cc/layers/delegated_frame_resource_collection.h" | 17 #include "cc/layers/delegated_frame_resource_collection.h" |
| 18 #include "cc/surfaces/surface_id.h" |
18 #include "content/common/content_export.h" | 19 #include "content/common/content_export.h" |
19 #include "ui/gfx/geometry/size.h" | 20 #include "ui/gfx/geometry/size.h" |
20 | 21 |
21 namespace base { | 22 namespace base { |
22 class SharedMemory; | 23 class SharedMemory; |
23 } | 24 } |
24 | 25 |
25 namespace cc { | 26 namespace cc { |
26 struct SurfaceId; | |
27 struct SurfaceSequence; | 27 struct SurfaceSequence; |
28 | 28 |
29 class CompositorFrame; | 29 class CompositorFrame; |
30 class Layer; | 30 class Layer; |
31 class SolidColorLayer; | 31 class SolidColorLayer; |
32 class SurfaceLayer; | 32 class SurfaceLayer; |
33 class DelegatedFrameProvider; | 33 class DelegatedFrameProvider; |
34 class DelegatedFrameResourceCollection; | 34 class DelegatedFrameResourceCollection; |
35 class DelegatedRendererLayer; | 35 class DelegatedRendererLayer; |
36 } | 36 } |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 uint32_t output_surface_id, | 72 uint32_t output_surface_id, |
73 int host_id, | 73 int host_id, |
74 base::SharedMemoryHandle handle); | 74 base::SharedMemoryHandle handle); |
75 void OnSetSurface(const cc::SurfaceId& surface_id, | 75 void OnSetSurface(const cc::SurfaceId& surface_id, |
76 const gfx::Size& frame_size, | 76 const gfx::Size& frame_size, |
77 float scale_factor, | 77 float scale_factor, |
78 const cc::SurfaceSequence& sequence); | 78 const cc::SurfaceSequence& sequence); |
79 void UpdateVisibility(bool); | 79 void UpdateVisibility(bool); |
80 void ChildFrameGone(); | 80 void ChildFrameGone(); |
81 | 81 |
| 82 cc::SurfaceId surface_id() const { return surface_id_; } |
| 83 |
82 // cc::DelegatedFrameProviderClient implementation. | 84 // cc::DelegatedFrameProviderClient implementation. |
83 void UnusedResourcesAreAvailable() override; | 85 void UnusedResourcesAreAvailable() override; |
84 | 86 |
85 protected: | 87 protected: |
86 // Friend RefCounted so that the dtor can be non-public. | 88 // Friend RefCounted so that the dtor can be non-public. |
87 friend class base::RefCounted<ChildFrameCompositingHelper>; | 89 friend class base::RefCounted<ChildFrameCompositingHelper>; |
88 | 90 |
89 private: | 91 private: |
90 ChildFrameCompositingHelper( | 92 ChildFrameCompositingHelper( |
91 const base::WeakPtr<BrowserPlugin>& browser_plugin, | 93 const base::WeakPtr<BrowserPlugin>& browser_plugin, |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 // The lifetime of this weak pointer should be greater than the lifetime of | 141 // The lifetime of this weak pointer should be greater than the lifetime of |
140 // other member objects, as they may access this pointer during their | 142 // other member objects, as they may access this pointer during their |
141 // destruction. | 143 // destruction. |
142 base::WeakPtr<BrowserPlugin> browser_plugin_; | 144 base::WeakPtr<BrowserPlugin> browser_plugin_; |
143 RenderFrameProxy* render_frame_proxy_; | 145 RenderFrameProxy* render_frame_proxy_; |
144 | 146 |
145 scoped_refptr<cc::DelegatedFrameResourceCollection> resource_collection_; | 147 scoped_refptr<cc::DelegatedFrameResourceCollection> resource_collection_; |
146 scoped_refptr<cc::DelegatedFrameProvider> frame_provider_; | 148 scoped_refptr<cc::DelegatedFrameProvider> frame_provider_; |
147 | 149 |
148 scoped_ptr<blink::WebLayer> web_layer_; | 150 scoped_ptr<blink::WebLayer> web_layer_; |
| 151 cc::SurfaceId surface_id_; |
149 blink::WebFrame* frame_; | 152 blink::WebFrame* frame_; |
150 | 153 |
151 DISALLOW_COPY_AND_ASSIGN(ChildFrameCompositingHelper); | 154 DISALLOW_COPY_AND_ASSIGN(ChildFrameCompositingHelper); |
152 }; | 155 }; |
153 | 156 |
154 } // namespace content | 157 } // namespace content |
155 | 158 |
156 #endif // CONTENT_RENDERER_CHILD_FRAME_COMPOSITING_HELPER_H_ | 159 #endif // CONTENT_RENDERER_CHILD_FRAME_COMPOSITING_HELPER_H_ |
OLD | NEW |