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