| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_PUBLIC_CPP_CONNECTOR_H_ | 5 #ifndef SERVICES_SHELL_PUBLIC_CPP_CONNECTOR_H_ |
| 6 #define SERVICES_SHELL_PUBLIC_CPP_CONNECTOR_H_ | 6 #define SERVICES_SHELL_PUBLIC_CPP_CONNECTOR_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "services/shell/public/cpp/connection.h" | 10 #include "services/shell/public/cpp/connection.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 mojom::PIDReceiverRequest pid_receiver_request) { | 46 mojom::PIDReceiverRequest pid_receiver_request) { |
| 47 service_ = std::move(service); | 47 service_ = std::move(service); |
| 48 pid_receiver_request_ = std::move(pid_receiver_request); | 48 pid_receiver_request_ = std::move(pid_receiver_request); |
| 49 } | 49 } |
| 50 void TakeClientProcessConnection( | 50 void TakeClientProcessConnection( |
| 51 mojom::ServicePtr* service, | 51 mojom::ServicePtr* service, |
| 52 mojom::PIDReceiverRequest* pid_receiver_request) { | 52 mojom::PIDReceiverRequest* pid_receiver_request) { |
| 53 *service = std::move(service_); | 53 *service = std::move(service_); |
| 54 *pid_receiver_request = std::move(pid_receiver_request_); | 54 *pid_receiver_request = std::move(pid_receiver_request_); |
| 55 } | 55 } |
| 56 InterfaceRegistry* exposed_interfaces() { return exposed_interfaces_; } | |
| 57 void set_exposed_interfaces(InterfaceRegistry* exposed_interfaces) { | |
| 58 exposed_interfaces_ = exposed_interfaces; | |
| 59 } | |
| 60 InterfaceProvider* remote_interfaces() { return remote_interfaces_; } | 56 InterfaceProvider* remote_interfaces() { return remote_interfaces_; } |
| 61 void set_remote_interfaces(InterfaceProvider* remote_interfaces) { | 57 void set_remote_interfaces(InterfaceProvider* remote_interfaces) { |
| 62 remote_interfaces_ = remote_interfaces; | 58 remote_interfaces_ = remote_interfaces; |
| 63 } | 59 } |
| 64 | 60 |
| 65 private: | 61 private: |
| 66 Identity target_; | 62 Identity target_; |
| 67 mojom::ServicePtr service_; | 63 mojom::ServicePtr service_; |
| 68 mojom::PIDReceiverRequest pid_receiver_request_; | 64 mojom::PIDReceiverRequest pid_receiver_request_; |
| 69 InterfaceRegistry* exposed_interfaces_ = nullptr; | |
| 70 InterfaceProvider* remote_interfaces_ = nullptr; | 65 InterfaceProvider* remote_interfaces_ = nullptr; |
| 71 | 66 |
| 72 DISALLOW_COPY_AND_ASSIGN(ConnectParams); | 67 DISALLOW_COPY_AND_ASSIGN(ConnectParams); |
| 73 }; | 68 }; |
| 74 | 69 |
| 75 // Creates a new Connector instance and fills in |*request| with a request | 70 // Creates a new Connector instance and fills in |*request| with a request |
| 76 // for the other end the Connector's interface. | 71 // for the other end the Connector's interface. |
| 77 static std::unique_ptr<Connector> Create(mojom::ConnectorRequest* request); | 72 static std::unique_ptr<Connector> Create(mojom::ConnectorRequest* request); |
| 78 | 73 |
| 79 // Requests a new connection to an application. Returns a pointer to the | 74 // Requests a new connection to an application. Returns a pointer to the |
| (...skipping 29 matching lines...) Expand all Loading... |
| 109 | 104 |
| 110 // Creates a new instance of this class which may be passed to another thread. | 105 // Creates a new instance of this class which may be passed to another thread. |
| 111 // The returned object may be passed multiple times until Connect() is called, | 106 // The returned object may be passed multiple times until Connect() is called, |
| 112 // at which point this method must be called again to pass again. | 107 // at which point this method must be called again to pass again. |
| 113 virtual std::unique_ptr<Connector> Clone() = 0; | 108 virtual std::unique_ptr<Connector> Clone() = 0; |
| 114 }; | 109 }; |
| 115 | 110 |
| 116 } // namespace shell | 111 } // namespace shell |
| 117 | 112 |
| 118 #endif // SERVICES_SHELL_PUBLIC_CPP_CONNECTOR_H_ | 113 #endif // SERVICES_SHELL_PUBLIC_CPP_CONNECTOR_H_ |
| OLD | NEW |