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> |
| 9 |
8 #include <string> | 10 #include <string> |
9 #include <vector> | 11 #include <vector> |
10 | 12 |
| 13 #include "base/macros.h" |
11 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
12 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
13 #include "base/memory/shared_memory.h" | 16 #include "base/memory/shared_memory.h" |
14 #include "cc/layers/delegated_frame_resource_collection.h" | 17 #include "cc/layers/delegated_frame_resource_collection.h" |
15 #include "content/common/content_export.h" | 18 #include "content/common/content_export.h" |
16 #include "ui/gfx/geometry/size.h" | 19 #include "ui/gfx/geometry/size.h" |
17 | 20 |
18 namespace base { | 21 namespace base { |
19 class SharedMemory; | 22 class SharedMemory; |
20 } | 23 } |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 public: | 62 public: |
60 static ChildFrameCompositingHelper* CreateForBrowserPlugin( | 63 static ChildFrameCompositingHelper* CreateForBrowserPlugin( |
61 const base::WeakPtr<BrowserPlugin>& browser_plugin); | 64 const base::WeakPtr<BrowserPlugin>& browser_plugin); |
62 static ChildFrameCompositingHelper* CreateForRenderFrameProxy( | 65 static ChildFrameCompositingHelper* CreateForRenderFrameProxy( |
63 RenderFrameProxy* render_frame_proxy); | 66 RenderFrameProxy* render_frame_proxy); |
64 | 67 |
65 void DidCommitCompositorFrame(); | 68 void DidCommitCompositorFrame(); |
66 void OnContainerDestroy(); | 69 void OnContainerDestroy(); |
67 void OnCompositorFrameSwapped(scoped_ptr<cc::CompositorFrame> frame, | 70 void OnCompositorFrameSwapped(scoped_ptr<cc::CompositorFrame> frame, |
68 int route_id, | 71 int route_id, |
69 uint32 output_surface_id, | 72 uint32_t output_surface_id, |
70 int host_id, | 73 int host_id, |
71 base::SharedMemoryHandle handle); | 74 base::SharedMemoryHandle handle); |
72 void OnSetSurface(const cc::SurfaceId& surface_id, | 75 void OnSetSurface(const cc::SurfaceId& surface_id, |
73 const gfx::Size& frame_size, | 76 const gfx::Size& frame_size, |
74 float scale_factor, | 77 float scale_factor, |
75 const cc::SurfaceSequence& sequence); | 78 const cc::SurfaceSequence& sequence); |
76 void UpdateVisibility(bool); | 79 void UpdateVisibility(bool); |
77 void ChildFrameGone(); | 80 void ChildFrameGone(); |
78 | 81 |
79 // cc::DelegatedFrameProviderClient implementation. | 82 // cc::DelegatedFrameProviderClient implementation. |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 static void RequireCallbackBrowserPlugin( | 122 static void RequireCallbackBrowserPlugin( |
120 scoped_refptr<ThreadSafeSender> sender, | 123 scoped_refptr<ThreadSafeSender> sender, |
121 int host_routing_id, | 124 int host_routing_id, |
122 int browser_plugin_instance_id, | 125 int browser_plugin_instance_id, |
123 cc::SurfaceId id, | 126 cc::SurfaceId id, |
124 cc::SurfaceSequence sequence); | 127 cc::SurfaceSequence sequence); |
125 void UpdateWebLayer(blink::WebLayer* layer); | 128 void UpdateWebLayer(blink::WebLayer* layer); |
126 | 129 |
127 int host_routing_id_; | 130 int host_routing_id_; |
128 int last_route_id_; | 131 int last_route_id_; |
129 uint32 last_output_surface_id_; | 132 uint32_t last_output_surface_id_; |
130 int last_host_id_; | 133 int last_host_id_; |
131 bool ack_pending_; | 134 bool ack_pending_; |
132 bool opaque_; | 135 bool opaque_; |
133 | 136 |
134 gfx::Size buffer_size_; | 137 gfx::Size buffer_size_; |
135 | 138 |
136 // 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 |
137 // other member objects, as they may access this pointer during their | 140 // other member objects, as they may access this pointer during their |
138 // destruction. | 141 // destruction. |
139 base::WeakPtr<BrowserPlugin> browser_plugin_; | 142 base::WeakPtr<BrowserPlugin> browser_plugin_; |
140 RenderFrameProxy* render_frame_proxy_; | 143 RenderFrameProxy* render_frame_proxy_; |
141 | 144 |
142 scoped_refptr<cc::DelegatedFrameResourceCollection> resource_collection_; | 145 scoped_refptr<cc::DelegatedFrameResourceCollection> resource_collection_; |
143 scoped_refptr<cc::DelegatedFrameProvider> frame_provider_; | 146 scoped_refptr<cc::DelegatedFrameProvider> frame_provider_; |
144 | 147 |
145 scoped_ptr<blink::WebLayer> web_layer_; | 148 scoped_ptr<blink::WebLayer> web_layer_; |
146 blink::WebFrame* frame_; | 149 blink::WebFrame* frame_; |
147 | 150 |
148 DISALLOW_COPY_AND_ASSIGN(ChildFrameCompositingHelper); | 151 DISALLOW_COPY_AND_ASSIGN(ChildFrameCompositingHelper); |
149 }; | 152 }; |
150 | 153 |
151 } // namespace content | 154 } // namespace content |
152 | 155 |
153 #endif // CONTENT_RENDERER_CHILD_FRAME_COMPOSITING_HELPER_H_ | 156 #endif // CONTENT_RENDERER_CHILD_FRAME_COMPOSITING_HELPER_H_ |
OLD | NEW |