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

Side by Side Diff: components/mus/ws/window_manager_window_tree_factory.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
OLDNEW
(Empty)
1 // Copyright 2016 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_WINDOW_MANAGER_WINDOW_TREE_FACTORY_H_
6 #define COMPONENTS_MUS_WS_WINDOW_MANAGER_WINDOW_TREE_FACTORY_H_
7
8 #include <stdint.h>
9
10 #include "components/mus/public/interfaces/window_manager_window_tree_factory.mo jom.h"
11 #include "components/mus/ws/user_id.h"
12 #include "mojo/public/cpp/bindings/binding.h"
13
14 namespace mus {
15 namespace ws {
16
17 class ServerWindow;
18 class WindowManagerWindowTreeFactorySet;
19 class WindowServer;
20 class WindowTree;
21
22 namespace test {
23 class WindowManagerWindowTreeFactorySetTestApi;
24 }
25
26 // Implementation of mojom::WindowManagerWindowTreeFactory.
27 class WindowManagerWindowTreeFactory
28 : public mojom::WindowManagerWindowTreeFactory {
29 public:
30 WindowManagerWindowTreeFactory(
31 WindowManagerWindowTreeFactorySet* window_manager_window_tree_factory_set,
32 const UserId& user_id,
33 mojo::InterfaceRequest<mojom::WindowManagerWindowTreeFactory> request);
34 ~WindowManagerWindowTreeFactory() override;
35
36 const UserId& user_id() const { return user_id_; }
37
38 WindowTree* window_tree() { return window_tree_; }
39
40 // mojom::WindowManagerWindowTreeFactory:
41 void CreateWindowTree(mojom::WindowTreeRequest window_tree_request,
42 mojom::WindowTreeClientPtr window_tree_client) override;
43
44 private:
45 friend class test::WindowManagerWindowTreeFactorySetTestApi;
46
47 // Used by tests.
48 WindowManagerWindowTreeFactory(WindowManagerWindowTreeFactorySet* registry,
49 const UserId& user_id);
50
51 WindowServer* GetWindowServer();
52
53 void SetWindowTree(WindowTree* window_tree);
54
55 WindowManagerWindowTreeFactorySet* window_manager_window_tree_factory_set_;
56 const UserId user_id_;
57 mojo::Binding<mojom::WindowManagerWindowTreeFactory> binding_;
58
59 // Owned by WindowServer.
60 WindowTree* window_tree_;
61
62 DISALLOW_COPY_AND_ASSIGN(WindowManagerWindowTreeFactory);
63 };
64
65 } // namespace ws
66 } // namespace mus
67
68 #endif // COMPONENTS_MUS_WS_WINDOW_MANAGER_WINDOW_TREE_FACTORY_H_
OLDNEW
« no previous file with comments | « components/mus/ws/window_manager_state_unittest.cc ('k') | components/mus/ws/window_manager_window_tree_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698