| 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" | |
| 19 #include "content/common/content_export.h" | 18 #include "content/common/content_export.h" |
| 20 #include "ui/gfx/geometry/size.h" | 19 #include "ui/gfx/geometry/size.h" |
| 21 | 20 |
| 22 namespace base { | 21 namespace base { |
| 23 class SharedMemory; | 22 class SharedMemory; |
| 24 } | 23 } |
| 25 | 24 |
| 26 namespace cc { | 25 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 | |
| 84 // cc::DelegatedFrameProviderClient implementation. | 82 // cc::DelegatedFrameProviderClient implementation. |
| 85 void UnusedResourcesAreAvailable() override; | 83 void UnusedResourcesAreAvailable() override; |
| 86 | 84 |
| 87 protected: | 85 protected: |
| 88 // Friend RefCounted so that the dtor can be non-public. | 86 // Friend RefCounted so that the dtor can be non-public. |
| 89 friend class base::RefCounted<ChildFrameCompositingHelper>; | 87 friend class base::RefCounted<ChildFrameCompositingHelper>; |
| 90 | 88 |
| 91 private: | 89 private: |
| 92 ChildFrameCompositingHelper( | 90 ChildFrameCompositingHelper( |
| 93 const base::WeakPtr<BrowserPlugin>& browser_plugin, | 91 const base::WeakPtr<BrowserPlugin>& browser_plugin, |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 // The lifetime of this weak pointer should be greater than the lifetime of | 139 // The lifetime of this weak pointer should be greater than the lifetime of |
| 142 // other member objects, as they may access this pointer during their | 140 // other member objects, as they may access this pointer during their |
| 143 // destruction. | 141 // destruction. |
| 144 base::WeakPtr<BrowserPlugin> browser_plugin_; | 142 base::WeakPtr<BrowserPlugin> browser_plugin_; |
| 145 RenderFrameProxy* render_frame_proxy_; | 143 RenderFrameProxy* render_frame_proxy_; |
| 146 | 144 |
| 147 scoped_refptr<cc::DelegatedFrameResourceCollection> resource_collection_; | 145 scoped_refptr<cc::DelegatedFrameResourceCollection> resource_collection_; |
| 148 scoped_refptr<cc::DelegatedFrameProvider> frame_provider_; | 146 scoped_refptr<cc::DelegatedFrameProvider> frame_provider_; |
| 149 | 147 |
| 150 scoped_ptr<blink::WebLayer> web_layer_; | 148 scoped_ptr<blink::WebLayer> web_layer_; |
| 151 cc::SurfaceId surface_id_; | |
| 152 blink::WebFrame* frame_; | 149 blink::WebFrame* frame_; |
| 153 | 150 |
| 154 DISALLOW_COPY_AND_ASSIGN(ChildFrameCompositingHelper); | 151 DISALLOW_COPY_AND_ASSIGN(ChildFrameCompositingHelper); |
| 155 }; | 152 }; |
| 156 | 153 |
| 157 } // namespace content | 154 } // namespace content |
| 158 | 155 |
| 159 #endif // CONTENT_RENDERER_CHILD_FRAME_COMPOSITING_HELPER_H_ | 156 #endif // CONTENT_RENDERER_CHILD_FRAME_COMPOSITING_HELPER_H_ |
| OLD | NEW |