OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef MEDIA_BASE_SURFACE_MANAGER_H_ |
| 6 #define MEDIA_BASE_SURFACE_MANAGER_H_ |
| 7 |
| 8 #include "base/callback.h" |
| 9 #include "base/macros.h" |
| 10 #include "media/base/media_export.h" |
| 11 #include "ui/gfx/geometry/size.h" |
| 12 |
| 13 namespace media { |
| 14 |
| 15 using SurfaceCreatedCB = base::Callback<void(int)>; |
| 16 using RequestSurfaceCB = base::Callback<void(const SurfaceCreatedCB&)>; |
| 17 |
| 18 class MEDIA_EXPORT SurfaceManager { |
| 19 public: |
| 20 enum { kNoSurfaceID = -1 }; |
| 21 |
| 22 SurfaceManager() {} |
| 23 virtual ~SurfaceManager() {} |
| 24 |
| 25 virtual void CreateFullscreenSurface( |
| 26 const gfx::Size& video_natural_size, |
| 27 const SurfaceCreatedCB& surface_created_cb) = 0; |
| 28 |
| 29 // Call when the natural size of the fullscreen video changed. The surface |
| 30 // will be resized to match the aspect ratio. |
| 31 virtual void NaturalSizeChanged(const gfx::Size& size) = 0; |
| 32 |
| 33 private: |
| 34 DISALLOW_COPY_AND_ASSIGN(SurfaceManager); |
| 35 }; |
| 36 |
| 37 } // namespace media |
| 38 |
| 39 #endif // MEDIA_BASE_SURFACE_MANAGER_H_ |
OLD | NEW |