Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: ui/aura/mus/client_surface_embedder.h

Issue 2580063002: Mustash: Ensure surfaces submitted to Mus by WM and embedders contain Surfaces with embeded content. (Closed)
Patch Set: Addressing feedback. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 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 #include <memory>
6
7 #include "base/macros.h"
8
9 namespace ui {
10 class Layer;
11 }
12
13 namespace aura {
14
15 struct SurfaceInfo;
16 class Window;
17
18 // Used by WindowPortMus when it is embedding a client. Responsible for setting
19 // up layers containing content from the client, parenting them to the window's
20 // layer, and updating them when the client submits new surfaces.
21 class ClientSurfaceEmbedder {
22 public:
23 explicit ClientSurfaceEmbedder(Window* window);
24 ~ClientSurfaceEmbedder();
25
26 // Updates the surface layer and the clip layer based on the surface info.
27 void UpdateSurface(const SurfaceInfo& surface_info);
28
29 private:
30 // The window which embeds the client.
31 Window* window_;
32
33 // Contains the client's content.
34 std::unique_ptr<ui::Layer> surface_layer_;
35
36 // Used for clipping the surface layer to the window bounds.
37 std::unique_ptr<ui::Layer> clip_layer_;
38
39 DISALLOW_COPY_AND_ASSIGN(ClientSurfaceEmbedder);
40 };
41
42 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698