| 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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 RenderWidgetHostImpl* host_; | 208 RenderWidgetHostImpl* host_; |
| 209 | 209 |
| 210 // Surface-related state. | 210 // Surface-related state. |
| 211 scoped_ptr<cc::SurfaceIdAllocator> id_allocator_; | 211 scoped_ptr<cc::SurfaceIdAllocator> id_allocator_; |
| 212 scoped_ptr<cc::SurfaceFactory> surface_factory_; | 212 scoped_ptr<cc::SurfaceFactory> surface_factory_; |
| 213 cc::SurfaceId surface_id_; | 213 cc::SurfaceId surface_id_; |
| 214 uint32_t next_surface_sequence_; | 214 uint32_t next_surface_sequence_; |
| 215 uint32_t last_output_surface_id_; | 215 uint32_t last_output_surface_id_; |
| 216 gfx::Size current_surface_size_; | 216 gfx::Size current_surface_size_; |
| 217 float current_surface_scale_factor_; | 217 float current_surface_scale_factor_; |
| 218 gfx::Rect last_screen_rect_; |
| 218 uint32_t ack_pending_count_; | 219 uint32_t ack_pending_count_; |
| 219 cc::ReturnedResourceArray surface_returned_resources_; | 220 cc::ReturnedResourceArray surface_returned_resources_; |
| 220 | 221 |
| 221 // frame_connector_ provides a platform abstraction. Messages | 222 // frame_connector_ provides a platform abstraction. Messages |
| 222 // sent through it are routed to the embedding renderer process. | 223 // sent through it are routed to the embedding renderer process. |
| 223 CrossProcessFrameConnector* frame_connector_; | 224 CrossProcessFrameConnector* frame_connector_; |
| 224 | 225 |
| 225 base::WeakPtr<RenderWidgetHostViewChildFrame> AsWeakPtr() { | 226 base::WeakPtr<RenderWidgetHostViewChildFrame> AsWeakPtr() { |
| 226 return weak_factory_.GetWeakPtr(); | 227 return weak_factory_.GetWeakPtr(); |
| 227 } | 228 } |
| 228 | 229 |
| 229 private: | 230 private: |
| 230 void SubmitSurfaceCopyRequest(const gfx::Rect& src_subrect, | 231 void SubmitSurfaceCopyRequest(const gfx::Rect& src_subrect, |
| 231 const gfx::Size& dst_size, | 232 const gfx::Size& dst_size, |
| 232 const ReadbackRequestCallback& callback, | 233 const ReadbackRequestCallback& callback, |
| 233 const SkColorType preferred_color_type); | 234 const SkColorType preferred_color_type); |
| 234 | 235 |
| 235 using FrameSwappedCallbackList = std::deque<scoped_ptr<base::Closure>>; | 236 using FrameSwappedCallbackList = std::deque<scoped_ptr<base::Closure>>; |
| 236 // Since frame-drawn callbacks are "fire once", we use std::deque to make | 237 // Since frame-drawn callbacks are "fire once", we use std::deque to make |
| 237 // it convenient to swap() when processing the list. | 238 // it convenient to swap() when processing the list. |
| 238 FrameSwappedCallbackList frame_swapped_callbacks_; | 239 FrameSwappedCallbackList frame_swapped_callbacks_; |
| 239 | 240 |
| 240 base::WeakPtrFactory<RenderWidgetHostViewChildFrame> weak_factory_; | 241 base::WeakPtrFactory<RenderWidgetHostViewChildFrame> weak_factory_; |
| 241 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewChildFrame); | 242 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewChildFrame); |
| 242 }; | 243 }; |
| 243 | 244 |
| 244 } // namespace content | 245 } // namespace content |
| 245 | 246 |
| 246 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_ | 247 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_ |
| OLD | NEW |