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

Side by Side Diff: services/ui/public/cpp/window_tree_host_factory.cc

Issue 2651593002: mus: Remove the old client lib. (Closed)
Patch Set: restore test 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 | « services/ui/public/cpp/window_tree_host_factory.h ('k') | services/ui/ws/BUILD.gn » ('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 #include "services/ui/public/cpp/window_tree_host_factory.h"
6
7 #include "base/memory/ptr_util.h"
8 #include "services/service_manager/public/cpp/connector.h"
9 #include "services/ui/public/cpp/window_tree_client.h"
10 #include "services/ui/public/cpp/window_tree_client_delegate.h"
11 #include "services/ui/public/interfaces/constants.mojom.h"
12
13 namespace ui {
14
15 std::unique_ptr<WindowTreeClient> CreateWindowTreeHost(
16 mojom::WindowTreeHostFactory* factory,
17 WindowTreeClientDelegate* delegate,
18 mojom::WindowTreeHostPtr* host,
19 WindowManagerDelegate* window_manager_delegate) {
20 mojom::WindowTreeClientPtr tree_client;
21 std::unique_ptr<WindowTreeClient> window_tree_client =
22 base::MakeUnique<WindowTreeClient>(delegate, window_manager_delegate,
23 MakeRequest(&tree_client));
24 factory->CreateWindowTreeHost(MakeRequest(host), std::move(tree_client));
25 return window_tree_client;
26 }
27
28 std::unique_ptr<WindowTreeClient> CreateWindowTreeHost(
29 service_manager::Connector* connector,
30 WindowTreeClientDelegate* delegate,
31 mojom::WindowTreeHostPtr* host,
32 WindowManagerDelegate* window_manager_delegate) {
33 mojom::WindowTreeHostFactoryPtr factory;
34 connector->BindInterface(ui::mojom::kServiceName, &factory);
35 return CreateWindowTreeHost(factory.get(), delegate, host,
36 window_manager_delegate);
37 }
38
39 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/public/cpp/window_tree_host_factory.h ('k') | services/ui/ws/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698