| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 // the embedding renderer process implements the platform containing the | 46 // the embedding renderer process implements the platform containing the |
| 47 // widget, and the top-level frame's RenderWidgetHostView will ultimately | 47 // widget, and the top-level frame's RenderWidgetHostView will ultimately |
| 48 // manage all native widget interaction. | 48 // manage all native widget interaction. |
| 49 // | 49 // |
| 50 // See comments in render_widget_host_view.h about this class and its members. | 50 // See comments in render_widget_host_view.h about this class and its members. |
| 51 class CONTENT_EXPORT RenderWidgetHostViewChildFrame | 51 class CONTENT_EXPORT RenderWidgetHostViewChildFrame |
| 52 : public RenderWidgetHostViewBase, | 52 : public RenderWidgetHostViewBase, |
| 53 public cc::SurfaceFactoryClient, | 53 public cc::SurfaceFactoryClient, |
| 54 public cc::BeginFrameObserver { | 54 public cc::BeginFrameObserver { |
| 55 public: | 55 public: |
| 56 explicit RenderWidgetHostViewChildFrame(RenderWidgetHost* widget); | 56 static RenderWidgetHostViewChildFrame* Create(RenderWidgetHost* widget); |
| 57 ~RenderWidgetHostViewChildFrame() override; | 57 ~RenderWidgetHostViewChildFrame() override; |
| 58 | 58 |
| 59 void SetCrossProcessFrameConnector( | 59 void SetCrossProcessFrameConnector( |
| 60 CrossProcessFrameConnector* frame_connector); | 60 CrossProcessFrameConnector* frame_connector); |
| 61 | 61 |
| 62 // This functions registers single-use callbacks that want to be notified when | 62 // This functions registers single-use callbacks that want to be notified when |
| 63 // the next frame is swapped. The callback is triggered by | 63 // the next frame is swapped. The callback is triggered by |
| 64 // OnSwapCompositorFrame, which is the appropriate time to request pixel | 64 // OnSwapCompositorFrame, which is the appropriate time to request pixel |
| 65 // readback for the frame that is about to be drawn. Once called, the callback | 65 // readback for the frame that is about to be drawn. Once called, the callback |
| 66 // pointer is released. | 66 // pointer is released. |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 RenderWidgetHostViewBase* GetParentView(); | 189 RenderWidgetHostViewBase* GetParentView(); |
| 190 | 190 |
| 191 void RegisterFrameSinkId(); | 191 void RegisterFrameSinkId(); |
| 192 void UnregisterFrameSinkId(); | 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 explicit RenderWidgetHostViewChildFrame(RenderWidgetHost* widget); |
| 200 void Init(); |
| 201 |
| 199 // Clears current compositor surface, if one is in use. | 202 // Clears current compositor surface, if one is in use. |
| 200 void ClearCompositorSurfaceIfNecessary(); | 203 void ClearCompositorSurfaceIfNecessary(); |
| 201 | 204 |
| 202 void ProcessFrameSwappedCallbacks(); | 205 void ProcessFrameSwappedCallbacks(); |
| 203 | 206 |
| 204 // The last scroll offset of the view. | 207 // The last scroll offset of the view. |
| 205 gfx::Vector2dF last_scroll_offset_; | 208 gfx::Vector2dF last_scroll_offset_; |
| 206 | 209 |
| 207 // Members will become private when RenderWidgetHostViewGuest is removed. | 210 // Members will become private when RenderWidgetHostViewGuest is removed. |
| 208 // The model object. | 211 // The model object. |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 // The surface client ID of the parent RenderWidgetHostView. 0 if none. | 251 // The surface client ID of the parent RenderWidgetHostView. 0 if none. |
| 249 cc::FrameSinkId parent_frame_sink_id_; | 252 cc::FrameSinkId parent_frame_sink_id_; |
| 250 | 253 |
| 251 base::WeakPtrFactory<RenderWidgetHostViewChildFrame> weak_factory_; | 254 base::WeakPtrFactory<RenderWidgetHostViewChildFrame> weak_factory_; |
| 252 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewChildFrame); | 255 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewChildFrame); |
| 253 }; | 256 }; |
| 254 | 257 |
| 255 } // namespace content | 258 } // namespace content |
| 256 | 259 |
| 257 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_ | 260 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_ |
| OLD | NEW |