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

Side by Side Diff: services/shell/connect_params.h

Issue 2419063003: Move services/shell to services/service_manager (Closed)
Patch Set: 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
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 SERVICES_SHELL_CONNECT_PARAMS_H_
6 #define SERVICES_SHELL_CONNECT_PARAMS_H_
7
8 #include <string>
9 #include <utility>
10
11 #include "base/callback.h"
12 #include "base/macros.h"
13 #include "services/shell/public/cpp/identity.h"
14 #include "services/shell/public/interfaces/connector.mojom.h"
15 #include "services/shell/public/interfaces/interface_provider.mojom.h"
16
17 namespace shell {
18
19 // This class represents a request for the application manager to connect to an
20 // application.
21 class ConnectParams {
22 public:
23 ConnectParams();
24 ~ConnectParams();
25
26 void set_source(const Identity& source) { source_ = source; }
27 const Identity& source() const { return source_; }
28 void set_target(const Identity& target) { target_ = target; }
29 const Identity& target() const { return target_; }
30
31 void set_remote_interfaces(mojom::InterfaceProviderRequest value) {
32 remote_interfaces_ = std::move(value);
33 }
34 mojom::InterfaceProviderRequest TakeRemoteInterfaces() {
35 return std::move(remote_interfaces_);
36 }
37
38 void set_client_process_connection(
39 mojom::ClientProcessConnectionPtr client_process_connection) {
40 client_process_connection_ = std::move(client_process_connection);
41 }
42 mojom::ClientProcessConnectionPtr TakeClientProcessConnection() {
43 return std::move(client_process_connection_);
44 }
45
46 void set_connect_callback(const mojom::Connector::ConnectCallback& value) {
47 connect_callback_ = value;
48 }
49 const mojom::Connector::ConnectCallback& connect_callback() const {
50 return connect_callback_;
51 }
52
53 private:
54 // It may be null (i.e., is_null() returns true) which indicates that there is
55 // no source (e.g., for the first application or in tests).
56 Identity source_;
57 // The identity of the application being connected to.
58 Identity target_;
59
60 mojom::InterfaceProviderRequest remote_interfaces_;
61 mojom::ClientProcessConnectionPtr client_process_connection_;
62 mojom::Connector::ConnectCallback connect_callback_;
63
64 DISALLOW_COPY_AND_ASSIGN(ConnectParams);
65 };
66
67 } // namespace shell
68
69 #endif // SERVICES_SHELL_CONNECT_PARAMS_H_
OLDNEW
« no previous file with comments | « services/shell/background/tests/test_service_manifest.json ('k') | services/shell/connect_params.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698