| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 // coordinates for the current platform (e.g., DIP for Aura/Mac, physical for | 275 // coordinates for the current platform (e.g., DIP for Aura/Mac, physical for |
| 276 // Android), and is the region to be copied from this view. The copy is then | 276 // Android), and is the region to be copied from this view. The copy is then |
| 277 // scaled and letterboxed with black borders to fit |target|. Finally, | 277 // scaled and letterboxed with black borders to fit |target|. Finally, |
| 278 // |callback| is asynchronously run with true/false for | 278 // |callback| is asynchronously run with true/false for |
| 279 // success/failure. |target| must point to an allocated, YV12 video frame of | 279 // success/failure. |target| must point to an allocated, YV12 video frame of |
| 280 // the intended size. This operation will fail if there is no available | 280 // the intended size. This operation will fail if there is no available |
| 281 // compositing surface. | 281 // compositing surface. |
| 282 virtual void CopyFromCompositingSurfaceToVideoFrame( | 282 virtual void CopyFromCompositingSurfaceToVideoFrame( |
| 283 const gfx::Rect& src_subrect, | 283 const gfx::Rect& src_subrect, |
| 284 const scoped_refptr<media::VideoFrame>& target, | 284 const scoped_refptr<media::VideoFrame>& target, |
| 285 const base::Callback<void(bool)>& callback) = 0; | 285 const base::Callback<void(const gfx::Rect&, bool)>& callback) = 0; |
| 286 | 286 |
| 287 // Returns true if CopyFromCompositingSurfaceToVideoFrame() is likely to | 287 // Returns true if CopyFromCompositingSurfaceToVideoFrame() is likely to |
| 288 // succeed. | 288 // succeed. |
| 289 // | 289 // |
| 290 // TODO(nick): When VideoFrame copies are broadly implemented, this method | 290 // TODO(nick): When VideoFrame copies are broadly implemented, this method |
| 291 // should be renamed to HasCompositingSurface(), or unified with | 291 // should be renamed to HasCompositingSurface(), or unified with |
| 292 // IsSurfaceAvailableForCopy() and HasAcceleratedSurface(). | 292 // IsSurfaceAvailableForCopy() and HasAcceleratedSurface(). |
| 293 virtual bool CanCopyToVideoFrame() const = 0; | 293 virtual bool CanCopyToVideoFrame() const = 0; |
| 294 | 294 |
| 295 // Return true if the view has an accelerated surface that contains the last | 295 // Return true if the view has an accelerated surface that contains the last |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 base::OneShotTimer flush_input_timer_; | 424 base::OneShotTimer flush_input_timer_; |
| 425 | 425 |
| 426 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_; | 426 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_; |
| 427 | 427 |
| 428 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); | 428 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); |
| 429 }; | 429 }; |
| 430 | 430 |
| 431 } // namespace content | 431 } // namespace content |
| 432 | 432 |
| 433 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ | 433 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ |
| OLD | NEW |