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