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

Side by Side Diff: components/mus/ws/display_binding.h

Issue 2119963002: Move mus to //services/ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 5 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 | « components/mus/ws/display.cc ('k') | components/mus/ws/display_binding.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 2015 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 COMPONENTS_MUS_WS_DISPLAY_BINDING_H_
6 #define COMPONENTS_MUS_WS_DISPLAY_BINDING_H_
7
8 #include <memory>
9
10 #include "base/macros.h"
11 #include "components/mus/public/interfaces/window_tree_host.mojom.h"
12 #include "components/mus/ws/display.h"
13 #include "components/mus/ws/user_id.h"
14 #include "mojo/public/cpp/bindings/binding.h"
15
16 namespace mus {
17 namespace ws {
18
19 class ServerWindow;
20 class WindowServer;
21 class WindowTree;
22
23 // DisplayBinding manages the binding between a Display and it's mojo clients.
24 // DisplayBinding is used when a Display is created via a
25 // WindowTreeHostFactory.
26 //
27 // DisplayBinding is owned by Display.
28 class DisplayBinding {
29 public:
30 virtual ~DisplayBinding() {}
31
32 virtual WindowTree* CreateWindowTree(ServerWindow* root) = 0;
33 };
34
35 // Live implementation of DisplayBinding.
36 class DisplayBindingImpl : public DisplayBinding {
37 public:
38 DisplayBindingImpl(mojom::WindowTreeHostRequest request,
39 Display* display,
40 const UserId& user_id,
41 mojom::WindowTreeClientPtr client,
42 WindowServer* window_server);
43 ~DisplayBindingImpl() override;
44
45 private:
46 // DisplayBinding:
47 WindowTree* CreateWindowTree(ServerWindow* root) override;
48
49 WindowServer* window_server_;
50 const UserId user_id_;
51 mojo::Binding<mojom::WindowTreeHost> binding_;
52 mojom::WindowTreeClientPtr client_;
53
54 DISALLOW_COPY_AND_ASSIGN(DisplayBindingImpl);
55 };
56
57 } // namespace ws
58 } // namespace mus
59
60 #endif // COMPONENTS_MUS_WS_DISPLAY_BINDING_H_
OLDNEW
« no previous file with comments | « components/mus/ws/display.cc ('k') | components/mus/ws/display_binding.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698