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_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_ |
6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
182 // Exposed for tests. | 182 // Exposed for tests. |
183 bool IsChildFrameForTesting() const override; | 183 bool IsChildFrameForTesting() const override; |
184 cc::SurfaceId SurfaceIdForTesting() const override; | 184 cc::SurfaceId SurfaceIdForTesting() const override; |
185 CrossProcessFrameConnector* FrameConnectorForTesting() const { | 185 CrossProcessFrameConnector* FrameConnectorForTesting() const { |
186 return frame_connector_; | 186 return frame_connector_; |
187 } | 187 } |
188 | 188 |
189 void RegisterSurfaceNamespaceId(); | 189 void RegisterSurfaceNamespaceId(); |
190 void UnregisterSurfaceNamespaceId(); | 190 void UnregisterSurfaceNamespaceId(); |
191 | 191 |
192 unsigned frame_count() const { return frame_count_; } | |
193 | |
192 protected: | 194 protected: |
193 friend class RenderWidgetHostView; | 195 friend class RenderWidgetHostView; |
194 friend class RenderWidgetHostViewChildFrameTest; | 196 friend class RenderWidgetHostViewChildFrameTest; |
195 friend class RenderWidgetHostViewGuestSurfaceTest; | 197 friend class RenderWidgetHostViewGuestSurfaceTest; |
196 | 198 |
197 // Clears current compositor surface, if one is in use. | 199 // Clears current compositor surface, if one is in use. |
198 void ClearCompositorSurfaceIfNecessary(); | 200 void ClearCompositorSurfaceIfNecessary(); |
199 | 201 |
200 void ProcessFrameSwappedCallbacks(); | 202 void ProcessFrameSwappedCallbacks(); |
201 | 203 |
202 // The last scroll offset of the view. | 204 // The last scroll offset of the view. |
203 gfx::Vector2dF last_scroll_offset_; | 205 gfx::Vector2dF last_scroll_offset_; |
204 | 206 |
205 // Members will become private when RenderWidgetHostViewGuest is removed. | 207 // Members will become private when RenderWidgetHostViewGuest is removed. |
206 // The model object. | 208 // The model object. |
207 RenderWidgetHostImpl* host_; | 209 RenderWidgetHostImpl* host_; |
208 | 210 |
209 // Surface-related state. | 211 // Surface-related state. |
210 std::unique_ptr<cc::SurfaceIdAllocator> id_allocator_; | 212 std::unique_ptr<cc::SurfaceIdAllocator> id_allocator_; |
211 std::unique_ptr<cc::SurfaceFactory> surface_factory_; | 213 std::unique_ptr<cc::SurfaceFactory> surface_factory_; |
212 cc::SurfaceId surface_id_; | 214 cc::SurfaceId surface_id_; |
213 uint32_t next_surface_sequence_; | 215 uint32_t next_surface_sequence_; |
214 uint32_t last_output_surface_id_; | 216 uint32_t last_output_surface_id_; |
215 gfx::Size current_surface_size_; | 217 gfx::Size current_surface_size_; |
216 float current_surface_scale_factor_; | 218 float current_surface_scale_factor_; |
217 gfx::Rect last_screen_rect_; | 219 gfx::Rect last_screen_rect_; |
218 uint32_t ack_pending_count_; | 220 uint32_t ack_pending_count_; |
221 unsigned frame_count_; | |
kenrb
2016/07/05 14:30:56
I think this should be uint32_t, and the name migh
wjmaclean
2016/07/05 15:04:22
Done.
| |
219 cc::ReturnedResourceArray surface_returned_resources_; | 222 cc::ReturnedResourceArray surface_returned_resources_; |
220 | 223 |
221 // frame_connector_ provides a platform abstraction. Messages | 224 // frame_connector_ provides a platform abstraction. Messages |
222 // sent through it are routed to the embedding renderer process. | 225 // sent through it are routed to the embedding renderer process. |
223 CrossProcessFrameConnector* frame_connector_; | 226 CrossProcessFrameConnector* frame_connector_; |
224 | 227 |
225 base::WeakPtr<RenderWidgetHostViewChildFrame> AsWeakPtr() { | 228 base::WeakPtr<RenderWidgetHostViewChildFrame> AsWeakPtr() { |
226 return weak_factory_.GetWeakPtr(); | 229 return weak_factory_.GetWeakPtr(); |
227 } | 230 } |
228 | 231 |
(...skipping 15 matching lines...) Expand all Loading... | |
244 // The surface id namespace of the parent RenderWidgetHostView. 0 if none. | 247 // The surface id namespace of the parent RenderWidgetHostView. 0 if none. |
245 uint32_t parent_surface_id_namespace_; | 248 uint32_t parent_surface_id_namespace_; |
246 | 249 |
247 base::WeakPtrFactory<RenderWidgetHostViewChildFrame> weak_factory_; | 250 base::WeakPtrFactory<RenderWidgetHostViewChildFrame> weak_factory_; |
248 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewChildFrame); | 251 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewChildFrame); |
249 }; | 252 }; |
250 | 253 |
251 } // namespace content | 254 } // namespace content |
252 | 255 |
253 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_ | 256 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_ |
OLD | NEW |