OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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_SHELL_CONNECT_PARAMS_H_ | 5 #ifndef SERVICES_SHELL_CONNECT_PARAMS_H_ |
6 #define SERVICES_SHELL_CONNECT_PARAMS_H_ | 6 #define SERVICES_SHELL_CONNECT_PARAMS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 17 matching lines...) Expand all Loading... |
28 void set_target(const Identity& target) { target_ = target; } | 28 void set_target(const Identity& target) { target_ = target; } |
29 const Identity& target() const { return target_; } | 29 const Identity& target() const { return target_; } |
30 | 30 |
31 void set_remote_interfaces(mojom::InterfaceProviderRequest value) { | 31 void set_remote_interfaces(mojom::InterfaceProviderRequest value) { |
32 remote_interfaces_ = std::move(value); | 32 remote_interfaces_ = std::move(value); |
33 } | 33 } |
34 mojom::InterfaceProviderRequest TakeRemoteInterfaces() { | 34 mojom::InterfaceProviderRequest TakeRemoteInterfaces() { |
35 return std::move(remote_interfaces_); | 35 return std::move(remote_interfaces_); |
36 } | 36 } |
37 | 37 |
38 void set_local_interfaces(mojom::InterfaceProviderPtr value) { | |
39 local_interfaces_ = std::move(value); | |
40 } | |
41 mojom::InterfaceProviderPtr TakeLocalInterfaces() { | |
42 return std::move(local_interfaces_); | |
43 } | |
44 | |
45 void set_client_process_connection( | 38 void set_client_process_connection( |
46 mojom::ClientProcessConnectionPtr client_process_connection) { | 39 mojom::ClientProcessConnectionPtr client_process_connection) { |
47 client_process_connection_ = std::move(client_process_connection); | 40 client_process_connection_ = std::move(client_process_connection); |
48 } | 41 } |
49 mojom::ClientProcessConnectionPtr TakeClientProcessConnection() { | 42 mojom::ClientProcessConnectionPtr TakeClientProcessConnection() { |
50 return std::move(client_process_connection_); | 43 return std::move(client_process_connection_); |
51 } | 44 } |
52 | 45 |
53 void set_connect_callback(const mojom::Connector::ConnectCallback& value) { | 46 void set_connect_callback(const mojom::Connector::ConnectCallback& value) { |
54 connect_callback_ = value; | 47 connect_callback_ = value; |
55 } | 48 } |
56 const mojom::Connector::ConnectCallback& connect_callback() const { | 49 const mojom::Connector::ConnectCallback& connect_callback() const { |
57 return connect_callback_; | 50 return connect_callback_; |
58 } | 51 } |
59 | 52 |
60 private: | 53 private: |
61 // It may be null (i.e., is_null() returns true) which indicates that there is | 54 // It may be null (i.e., is_null() returns true) which indicates that there is |
62 // no source (e.g., for the first application or in tests). | 55 // no source (e.g., for the first application or in tests). |
63 Identity source_; | 56 Identity source_; |
64 // The identity of the application being connected to. | 57 // The identity of the application being connected to. |
65 Identity target_; | 58 Identity target_; |
66 | 59 |
67 mojom::InterfaceProviderRequest remote_interfaces_; | 60 mojom::InterfaceProviderRequest remote_interfaces_; |
68 mojom::InterfaceProviderPtr local_interfaces_; | |
69 mojom::ClientProcessConnectionPtr client_process_connection_; | 61 mojom::ClientProcessConnectionPtr client_process_connection_; |
70 mojom::Connector::ConnectCallback connect_callback_; | 62 mojom::Connector::ConnectCallback connect_callback_; |
71 | 63 |
72 DISALLOW_COPY_AND_ASSIGN(ConnectParams); | 64 DISALLOW_COPY_AND_ASSIGN(ConnectParams); |
73 }; | 65 }; |
74 | 66 |
75 } // namespace shell | 67 } // namespace shell |
76 | 68 |
77 #endif // SERVICES_SHELL_CONNECT_PARAMS_H_ | 69 #endif // SERVICES_SHELL_CONNECT_PARAMS_H_ |
OLD | NEW |