| Index: ui/aura/mus/client_surface_embedder.h
|
| diff --git a/ui/aura/mus/client_surface_embedder.h b/ui/aura/mus/client_surface_embedder.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..6d7c31fee4f547e657dbcd671783e322e7f1cc91
|
| --- /dev/null
|
| +++ b/ui/aura/mus/client_surface_embedder.h
|
| @@ -0,0 +1,42 @@
|
| +// Copyright 2017 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.
|
| +
|
| +#include <memory>
|
| +
|
| +#include "base/macros.h"
|
| +
|
| +namespace ui {
|
| +class Layer;
|
| +}
|
| +
|
| +namespace aura {
|
| +
|
| +struct SurfaceInfo;
|
| +class Window;
|
| +
|
| +// Used by WindowPortMus when it is embedding a client. Responsible for setting
|
| +// up layers containing content from the client, parenting them to the window's
|
| +// layer, and updating them when the client submits new surfaces.
|
| +class ClientSurfaceEmbedder {
|
| + public:
|
| + explicit ClientSurfaceEmbedder(Window* window);
|
| + ~ClientSurfaceEmbedder();
|
| +
|
| + // Updates the surface layer and the clip layer based on the surface info.
|
| + void UpdateSurface(const SurfaceInfo& surface_info);
|
| +
|
| + private:
|
| + // The window which embeds the client.
|
| + Window* window_;
|
| +
|
| + // Contains the client's content.
|
| + std::unique_ptr<ui::Layer> surface_layer_;
|
| +
|
| + // Used for clipping the surface layer to the window bounds.
|
| + std::unique_ptr<ui::Layer> clip_layer_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(ClientSurfaceEmbedder);
|
| +};
|
| +
|
| +} // namespace aura
|
|
|