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

Side by Side Diff: services/ui/ws/window_tree_factory.h

Issue 2326913003: Privatize StrongBinding lifetime management (Closed)
Patch Set: rebase Created 4 years, 3 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 | « services/ui/ws/window_server_test_impl.cc ('k') | services/ui/ws/window_tree_factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SERVICES_UI_WS_WINDOW_TREE_FACTORY_H_ 5 #ifndef SERVICES_UI_WS_WINDOW_TREE_FACTORY_H_
6 #define SERVICES_UI_WS_WINDOW_TREE_FACTORY_H_ 6 #define SERVICES_UI_WS_WINDOW_TREE_FACTORY_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "mojo/public/cpp/bindings/strong_binding.h"
10 #include "services/ui/public/interfaces/window_tree.mojom.h" 9 #include "services/ui/public/interfaces/window_tree.mojom.h"
11 #include "services/ui/ws/user_id.h" 10 #include "services/ui/ws/user_id.h"
12 11
13 namespace ui { 12 namespace ui {
14 namespace ws { 13 namespace ws {
15 14
16 class WindowServer; 15 class WindowServer;
17 16
18 class WindowTreeFactory : public ui::mojom::WindowTreeFactory { 17 class WindowTreeFactory : public ui::mojom::WindowTreeFactory {
19 public: 18 public:
20 WindowTreeFactory(WindowServer* window_server, 19 WindowTreeFactory(WindowServer* window_server,
21 const UserId& user_id, 20 const UserId& user_id,
22 const std::string& client_name, 21 const std::string& client_name);
23 mojom::WindowTreeFactoryRequest request);
24 private:
25 ~WindowTreeFactory() override; 22 ~WindowTreeFactory() override;
26 23
24 private:
27 // ui::mojom::WindowTreeFactory: 25 // ui::mojom::WindowTreeFactory:
28 void CreateWindowTree(mojo::InterfaceRequest<mojom::WindowTree> tree_request, 26 void CreateWindowTree(mojo::InterfaceRequest<mojom::WindowTree> tree_request,
29 mojom::WindowTreeClientPtr client) override; 27 mojom::WindowTreeClientPtr client) override;
30 28
31 WindowServer* window_server_; 29 WindowServer* window_server_;
32 const UserId user_id_; 30 const UserId user_id_;
33 const std::string client_name_; 31 const std::string client_name_;
34 mojo::StrongBinding<ui::mojom::WindowTreeFactory> binding_;
35 32
36 DISALLOW_COPY_AND_ASSIGN(WindowTreeFactory); 33 DISALLOW_COPY_AND_ASSIGN(WindowTreeFactory);
37 }; 34 };
38 35
39 } // namespace ws 36 } // namespace ws
40 } // namespace ui 37 } // namespace ui
41 38
42 #endif // SERVICES_UI_WS_WINDOW_TREE_FACTORY_H_ 39 #endif // SERVICES_UI_WS_WINDOW_TREE_FACTORY_H_
OLDNEW
« no previous file with comments | « services/ui/ws/window_server_test_impl.cc ('k') | services/ui/ws/window_tree_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698