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

Side by Side Diff: services/shell/connect_util.cc

Issue 2419723002: Move services/shell to services/service_manager (Closed)
Patch Set: rebase Created 4 years, 2 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/shell/connect_util.h ('k') | services/shell/manifest.json » ('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/shell/connect_util.h"
6
7 #include <memory>
8 #include <utility>
9
10 #include "services/shell/connect_params.h"
11 #include "services/shell/service_manager.h"
12
13 namespace shell {
14
15 mojo::ScopedMessagePipeHandle ConnectToInterfaceByName(
16 ServiceManager* service_manager,
17 const Identity& source,
18 const Identity& target,
19 const std::string& interface_name) {
20 mojom::InterfaceProviderPtr remote_interfaces;
21 std::unique_ptr<ConnectParams> params(new ConnectParams);
22 params->set_source(source);
23 params->set_target(target);
24 params->set_remote_interfaces(mojo::GetProxy(&remote_interfaces));
25 service_manager->Connect(std::move(params));
26 mojo::MessagePipe pipe;
27 remote_interfaces->GetInterface(interface_name, std::move(pipe.handle1));
28 return std::move(pipe.handle0);
29 }
30
31 } // namespace shell
OLDNEW
« no previous file with comments | « services/shell/connect_util.h ('k') | services/shell/manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698