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

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

Issue 2613903003: Reland of "Mustash: Ensure surfaces submitted to Mus by WM and embedders contain Surfaces with embe… (Closed)
Patch Set: fix 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
« no previous file with comments | « ui/aura/mus/DEPS ('k') | ui/aura/mus/client_surface_embedder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 cc {
10 class SurfaceInfo;
11 }
12
13 namespace ui {
14 class Layer;
15 }
16
17 namespace aura {
18
19 class Window;
20
21 // Used by WindowPortMus when it is embedding a client. Responsible for setting
22 // up layers containing content from the client, parenting them to the window's
23 // layer, and updating them when the client submits new surfaces.
24 class ClientSurfaceEmbedder {
25 public:
26 explicit ClientSurfaceEmbedder(Window* window);
27 ~ClientSurfaceEmbedder();
28
29 // Updates the surface layer and the clip layer based on the surface info.
30 void UpdateSurface(const cc::SurfaceInfo& surface_info);
31
32 private:
33 // The window which embeds the client.
34 Window* window_;
35
36 // Contains the client's content.
37 std::unique_ptr<ui::Layer> surface_layer_;
38
39 // Used for clipping the surface layer to the window bounds.
40 std::unique_ptr<ui::Layer> clip_layer_;
41
42 DISALLOW_COPY_AND_ASSIGN(ClientSurfaceEmbedder);
43 };
44
45 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/mus/DEPS ('k') | ui/aura/mus/client_surface_embedder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698