| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 return std::move(remote_interfaces_); | 46 return std::move(remote_interfaces_); |
| 47 } | 47 } |
| 48 | 48 |
| 49 void set_local_interfaces(shell::mojom::InterfaceProviderPtr value) { | 49 void set_local_interfaces(shell::mojom::InterfaceProviderPtr value) { |
| 50 local_interfaces_ = std::move(value); | 50 local_interfaces_ = std::move(value); |
| 51 } | 51 } |
| 52 shell::mojom::InterfaceProviderPtr TakeLocalInterfaces() { | 52 shell::mojom::InterfaceProviderPtr TakeLocalInterfaces() { |
| 53 return std::move(local_interfaces_); | 53 return std::move(local_interfaces_); |
| 54 } | 54 } |
| 55 | 55 |
| 56 void set_on_application_end(const base::Closure& value) { | |
| 57 on_application_end_ = value; | |
| 58 } | |
| 59 const base::Closure& on_application_end() const { | |
| 60 return on_application_end_; | |
| 61 } | |
| 62 | |
| 63 void set_connect_callback(const shell::mojom::Shell::ConnectCallback& value) { | 56 void set_connect_callback(const shell::mojom::Shell::ConnectCallback& value) { |
| 64 connect_callback_ = value; | 57 connect_callback_ = value; |
| 65 } | 58 } |
| 66 const shell::mojom::Shell::ConnectCallback& connect_callback() const { | 59 const shell::mojom::Shell::ConnectCallback& connect_callback() const { |
| 67 return connect_callback_; | 60 return connect_callback_; |
| 68 } | 61 } |
| 69 | 62 |
| 70 private: | 63 private: |
| 71 // 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 |
| 72 // no source (e.g., for the first application or in tests). | 65 // no source (e.g., for the first application or in tests). |
| 73 Identity source_; | 66 Identity source_; |
| 74 // The identity of the application being connected to. | 67 // The identity of the application being connected to. |
| 75 Identity target_; | 68 Identity target_; |
| 76 | 69 |
| 77 shell::mojom::InterfaceProviderRequest remote_interfaces_; | 70 shell::mojom::InterfaceProviderRequest remote_interfaces_; |
| 78 shell::mojom::InterfaceProviderPtr local_interfaces_; | 71 shell::mojom::InterfaceProviderPtr local_interfaces_; |
| 79 base::Closure on_application_end_; | |
| 80 shell::mojom::Shell::ConnectCallback connect_callback_; | 72 shell::mojom::Shell::ConnectCallback connect_callback_; |
| 81 | 73 |
| 82 DISALLOW_COPY_AND_ASSIGN(ConnectParams); | 74 DISALLOW_COPY_AND_ASSIGN(ConnectParams); |
| 83 }; | 75 }; |
| 84 | 76 |
| 85 } // namespace shell | 77 } // namespace shell |
| 86 } // namespace mojo | 78 } // namespace mojo |
| 87 | 79 |
| 88 #endif // MOJO_SHELL_CONNECT_PARAMS_H_ | 80 #endif // MOJO_SHELL_CONNECT_PARAMS_H_ |
| OLD | NEW |