| 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 "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "cc/resources/returned_resource.h" | 9 #include "cc/resources/returned_resource.h" |
| 10 #include "cc/surfaces/surface_factory_client.h" | 10 #include "cc/surfaces/surface_factory_client.h" |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 void SetParentNativeViewAccessible( | 141 void SetParentNativeViewAccessible( |
| 142 gfx::NativeViewAccessible accessible_parent) override; | 142 gfx::NativeViewAccessible accessible_parent) override; |
| 143 gfx::NativeViewId GetParentForWindowlessPlugin() const override; | 143 gfx::NativeViewId GetParentForWindowlessPlugin() const override; |
| 144 #endif | 144 #endif |
| 145 BrowserAccessibilityManager* CreateBrowserAccessibilityManager( | 145 BrowserAccessibilityManager* CreateBrowserAccessibilityManager( |
| 146 BrowserAccessibilityDelegate* delegate) override; | 146 BrowserAccessibilityDelegate* delegate) override; |
| 147 | 147 |
| 148 // cc::SurfaceFactoryClient implementation. | 148 // cc::SurfaceFactoryClient implementation. |
| 149 void ReturnResources(const cc::ReturnedResourceArray& resources) override; | 149 void ReturnResources(const cc::ReturnedResourceArray& resources) override; |
| 150 | 150 |
| 151 // Declared 'public' instead of 'protected' here to allow derived classes |
| 152 // to Bind() to it. |
| 153 void SurfaceDrawn(uint32 output_surface_id, cc::SurfaceDrawStatus drawn); |
| 154 |
| 151 protected: | 155 protected: |
| 152 friend class RenderWidgetHostView; | 156 friend class RenderWidgetHostView; |
| 153 friend class RenderWidgetHostViewChildFrameTest; | 157 friend class RenderWidgetHostViewChildFrameTest; |
| 154 | 158 |
| 155 void SurfaceDrawn(uint32 output_surface_id, cc::SurfaceDrawStatus drawn); | |
| 156 | |
| 157 // The last scroll offset of the view. | 159 // The last scroll offset of the view. |
| 158 gfx::Vector2dF last_scroll_offset_; | 160 gfx::Vector2dF last_scroll_offset_; |
| 159 | 161 |
| 160 // Members will become private when RenderWidgetHostViewGuest is removed. | 162 // Members will become private when RenderWidgetHostViewGuest is removed. |
| 161 // The model object. | 163 // The model object. |
| 162 RenderWidgetHostImpl* host_; | 164 RenderWidgetHostImpl* host_; |
| 163 | 165 |
| 164 // Flag determining whether we render into a compositing Surface. | 166 // Flag determining whether we render into a compositing Surface. |
| 165 bool use_surfaces_; | 167 bool use_surfaces_; |
| 166 | 168 |
| 167 // Surface-related state. | 169 // Surface-related state. |
| 168 scoped_ptr<cc::SurfaceIdAllocator> id_allocator_; | 170 scoped_ptr<cc::SurfaceIdAllocator> id_allocator_; |
| 169 scoped_ptr<cc::SurfaceFactory> surface_factory_; | 171 scoped_ptr<cc::SurfaceFactory> surface_factory_; |
| 170 cc::SurfaceId surface_id_; | 172 cc::SurfaceId surface_id_; |
| 171 uint32 next_surface_sequence_; | 173 uint32 next_surface_sequence_; |
| 172 uint32 last_output_surface_id_; | 174 uint32 last_output_surface_id_; |
| 173 gfx::Size current_surface_size_; | 175 gfx::Size current_surface_size_; |
| 174 float current_surface_scale_factor_; | 176 float current_surface_scale_factor_; |
| 175 uint32 ack_pending_count_; | 177 uint32 ack_pending_count_; |
| 176 cc::ReturnedResourceArray surface_returned_resources_; | 178 cc::ReturnedResourceArray surface_returned_resources_; |
| 177 | 179 |
| 178 // frame_connector_ provides a platform abstraction. Messages | 180 // frame_connector_ provides a platform abstraction. Messages |
| 179 // sent through it are routed to the embedding renderer process. | 181 // sent through it are routed to the embedding renderer process. |
| 180 CrossProcessFrameConnector* frame_connector_; | 182 CrossProcessFrameConnector* frame_connector_; |
| 181 | 183 |
| 182 private: | |
| 183 base::WeakPtr<RenderWidgetHostViewChildFrame> AsWeakPtr() { | 184 base::WeakPtr<RenderWidgetHostViewChildFrame> AsWeakPtr() { |
| 184 return weak_factory_.GetWeakPtr(); | 185 return weak_factory_.GetWeakPtr(); |
| 185 } | 186 } |
| 186 | 187 |
| 188 private: |
| 187 base::WeakPtrFactory<RenderWidgetHostViewChildFrame> weak_factory_; | 189 base::WeakPtrFactory<RenderWidgetHostViewChildFrame> weak_factory_; |
| 188 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewChildFrame); | 190 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewChildFrame); |
| 189 }; | 191 }; |
| 190 | 192 |
| 191 } // namespace content | 193 } // namespace content |
| 192 | 194 |
| 193 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_ | 195 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_ |
| OLD | NEW |