| 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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 } | 181 } |
| 182 | 182 |
| 183 // Returns the current surface scale factor. | 183 // Returns the current surface scale factor. |
| 184 float current_surface_scale_factor() { return current_surface_scale_factor_; } | 184 float current_surface_scale_factor() { return current_surface_scale_factor_; } |
| 185 | 185 |
| 186 // Returns the view into which this view is directly embedded. This can | 186 // Returns the view into which this view is directly embedded. This can |
| 187 // return nullptr when this view's associated child frame is not connected | 187 // return nullptr when this view's associated child frame is not connected |
| 188 // to the frame tree. | 188 // to the frame tree. |
| 189 RenderWidgetHostViewBase* GetParentView(); | 189 RenderWidgetHostViewBase* GetParentView(); |
| 190 | 190 |
| 191 void RegisterSurfaceNamespaceId(); | 191 void RegisterFrameSinkId(); |
| 192 void UnregisterSurfaceNamespaceId(); | 192 void UnregisterFrameSinkId(); |
| 193 | 193 |
| 194 protected: | 194 protected: |
| 195 friend class RenderWidgetHostView; | 195 friend class RenderWidgetHostView; |
| 196 friend class RenderWidgetHostViewChildFrameTest; | 196 friend class RenderWidgetHostViewChildFrameTest; |
| 197 friend class RenderWidgetHostViewGuestSurfaceTest; | 197 friend class RenderWidgetHostViewGuestSurfaceTest; |
| 198 | 198 |
| 199 // Clears current compositor surface, if one is in use. | 199 // Clears current compositor surface, if one is in use. |
| 200 void ClearCompositorSurfaceIfNecessary(); | 200 void ClearCompositorSurfaceIfNecessary(); |
| 201 | 201 |
| 202 void ProcessFrameSwappedCallbacks(); | 202 void ProcessFrameSwappedCallbacks(); |
| 203 | 203 |
| 204 // The last scroll offset of the view. | 204 // The last scroll offset of the view. |
| 205 gfx::Vector2dF last_scroll_offset_; | 205 gfx::Vector2dF last_scroll_offset_; |
| 206 | 206 |
| 207 // Members will become private when RenderWidgetHostViewGuest is removed. | 207 // Members will become private when RenderWidgetHostViewGuest is removed. |
| 208 // The model object. | 208 // The model object. |
| 209 RenderWidgetHostImpl* host_; | 209 RenderWidgetHostImpl* host_; |
| 210 | 210 |
| 211 // The ID for FrameSink associated with this view. |
| 212 cc::FrameSinkId frame_sink_id_; |
| 213 |
| 211 // Surface-related state. | 214 // Surface-related state. |
| 212 std::unique_ptr<cc::SurfaceIdAllocator> id_allocator_; | 215 std::unique_ptr<cc::SurfaceIdAllocator> id_allocator_; |
| 213 std::unique_ptr<cc::SurfaceFactory> surface_factory_; | 216 std::unique_ptr<cc::SurfaceFactory> surface_factory_; |
| 214 cc::SurfaceId surface_id_; | 217 cc::SurfaceId surface_id_; |
| 215 uint32_t next_surface_sequence_; | 218 uint32_t next_surface_sequence_; |
| 216 uint32_t last_compositor_frame_sink_id_; | 219 uint32_t last_compositor_frame_sink_id_; |
| 217 gfx::Size current_surface_size_; | 220 gfx::Size current_surface_size_; |
| 218 float current_surface_scale_factor_; | 221 float current_surface_scale_factor_; |
| 219 gfx::Rect last_screen_rect_; | 222 gfx::Rect last_screen_rect_; |
| 220 uint32_t ack_pending_count_; | 223 uint32_t ack_pending_count_; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 245 // The surface client ID of the parent RenderWidgetHostView. 0 if none. | 248 // The surface client ID of the parent RenderWidgetHostView. 0 if none. |
| 246 cc::FrameSinkId parent_frame_sink_id_; | 249 cc::FrameSinkId parent_frame_sink_id_; |
| 247 | 250 |
| 248 base::WeakPtrFactory<RenderWidgetHostViewChildFrame> weak_factory_; | 251 base::WeakPtrFactory<RenderWidgetHostViewChildFrame> weak_factory_; |
| 249 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewChildFrame); | 252 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewChildFrame); |
| 250 }; | 253 }; |
| 251 | 254 |
| 252 } // namespace content | 255 } // namespace content |
| 253 | 256 |
| 254 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_ | 257 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_ |
| OLD | NEW |