| Index: media/base/surface_manager.h
|
| diff --git a/media/base/surface_manager.h b/media/base/surface_manager.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..998a52c2ad4f3c42268aed21eae8bbd7f3581d6d
|
| --- /dev/null
|
| +++ b/media/base/surface_manager.h
|
| @@ -0,0 +1,39 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef MEDIA_BASE_SURFACE_MANAGER_H_
|
| +#define MEDIA_BASE_SURFACE_MANAGER_H_
|
| +
|
| +#include "base/callback.h"
|
| +#include "base/macros.h"
|
| +#include "media/base/media_export.h"
|
| +#include "ui/gfx/geometry/size.h"
|
| +
|
| +namespace media {
|
| +
|
| +using SurfaceCreatedCB = base::Callback<void(int)>;
|
| +using RequestSurfaceCB = base::Callback<void(const SurfaceCreatedCB&)>;
|
| +
|
| +class MEDIA_EXPORT SurfaceManager {
|
| + public:
|
| + enum { kNoSurfaceID = -1 };
|
| +
|
| + SurfaceManager() {}
|
| + virtual ~SurfaceManager() {}
|
| +
|
| + virtual void CreateFullscreenSurface(
|
| + const gfx::Size& video_size,
|
| + const SurfaceCreatedCB& surface_created_cb) = 0;
|
| +
|
| + // Call when the natural size of the fullscreen video changed. The surface
|
| + // will be resized to match the aspect ratio.
|
| + virtual void FullscreenVideoSizeChanged(const gfx::Size& size) = 0;
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(SurfaceManager);
|
| +};
|
| +
|
| +} // namespace media
|
| +
|
| +#endif // MEDIA_BASE_SURFACE_MANAGER_H_
|
|
|