| 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 | 171 |
| 172 // cc::SurfaceFactoryClient implementation. | 172 // cc::SurfaceFactoryClient implementation. |
| 173 void ReturnResources(const cc::ReturnedResourceArray& resources) override; | 173 void ReturnResources(const cc::ReturnedResourceArray& resources) override; |
| 174 void SetBeginFrameSource(cc::SurfaceId surface_id, | 174 void SetBeginFrameSource(cc::SurfaceId surface_id, |
| 175 cc::BeginFrameSource* begin_frame_source) override; | 175 cc::BeginFrameSource* begin_frame_source) override; |
| 176 | 176 |
| 177 // Declared 'public' instead of 'protected' here to allow derived classes | 177 // Declared 'public' instead of 'protected' here to allow derived classes |
| 178 // to Bind() to it. | 178 // to Bind() to it. |
| 179 void SurfaceDrawn(uint32_t output_surface_id, cc::SurfaceDrawStatus drawn); | 179 void SurfaceDrawn(uint32_t output_surface_id, cc::SurfaceDrawStatus drawn); |
| 180 | 180 |
| 181 // Exposed for tests. |
| 182 cc::SurfaceId SurfaceIdForTesting() const { return surface_id_; }; |
| 183 CrossProcessFrameConnector* FrameConnectorForTesting() const { |
| 184 return frame_connector_; |
| 185 } |
| 186 |
| 181 protected: | 187 protected: |
| 182 friend class RenderWidgetHostView; | 188 friend class RenderWidgetHostView; |
| 183 friend class RenderWidgetHostViewChildFrameTest; | 189 friend class RenderWidgetHostViewChildFrameTest; |
| 184 friend class RenderWidgetHostViewGuestSurfaceTest; | 190 friend class RenderWidgetHostViewGuestSurfaceTest; |
| 185 | 191 |
| 186 // Clears current compositor surface, if one is in use. | 192 // Clears current compositor surface, if one is in use. |
| 187 void ClearCompositorSurfaceIfNecessary(); | 193 void ClearCompositorSurfaceIfNecessary(); |
| 188 | 194 |
| 189 void ProcessFrameSwappedCallbacks(); | 195 void ProcessFrameSwappedCallbacks(); |
| 190 | 196 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 // it convenient to swap() when processing the list. | 231 // it convenient to swap() when processing the list. |
| 226 FrameSwappedCallbackList frame_swapped_callbacks_; | 232 FrameSwappedCallbackList frame_swapped_callbacks_; |
| 227 | 233 |
| 228 base::WeakPtrFactory<RenderWidgetHostViewChildFrame> weak_factory_; | 234 base::WeakPtrFactory<RenderWidgetHostViewChildFrame> weak_factory_; |
| 229 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewChildFrame); | 235 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewChildFrame); |
| 230 }; | 236 }; |
| 231 | 237 |
| 232 } // namespace content | 238 } // namespace content |
| 233 | 239 |
| 234 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_ | 240 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_ |
| OLD | NEW |