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 shell_client_ = std::move(shell_client); | 47 shell_client_ = std::move(shell_client); |
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::ShellClientPtr* shell_client, | 51 mojom::ShellClientPtr* shell_client, |
52 mojom::PIDReceiverRequest* pid_receiver_request) { | 52 mojom::PIDReceiverRequest* pid_receiver_request) { |
53 *shell_client = std::move(shell_client_); | 53 *shell_client = std::move(shell_client_); |
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_; } |
| 61 void set_remote_interfaces(InterfaceProvider* remote_interfaces) { |
| 62 remote_interfaces_ = remote_interfaces; |
| 63 } |
56 | 64 |
57 private: | 65 private: |
58 Identity target_; | 66 Identity target_; |
59 mojom::ShellClientPtr shell_client_; | 67 mojom::ShellClientPtr shell_client_; |
60 mojom::PIDReceiverRequest pid_receiver_request_; | 68 mojom::PIDReceiverRequest pid_receiver_request_; |
| 69 InterfaceRegistry* exposed_interfaces_ = nullptr; |
| 70 InterfaceProvider* remote_interfaces_ = nullptr; |
61 | 71 |
62 DISALLOW_COPY_AND_ASSIGN(ConnectParams); | 72 DISALLOW_COPY_AND_ASSIGN(ConnectParams); |
63 }; | 73 }; |
64 | 74 |
65 // Requests a new connection to an application. Returns a pointer to the | 75 // Requests a new connection to an application. Returns a pointer to the |
66 // connection if the connection is permitted by this application's delegate, | 76 // connection if the connection is permitted by this application's delegate, |
67 // or nullptr otherwise. Caller takes ownership. | 77 // or nullptr otherwise. Caller takes ownership. |
68 // Once this method is called, this object is bound to the thread on which the | 78 // Once this method is called, this object is bound to the thread on which the |
69 // call took place. To pass to another thread, call Clone() and pass the | 79 // call took place. To pass to another thread, call Clone() and pass the |
70 // result. | 80 // result. |
(...skipping 24 matching lines...) Expand all Loading... |
95 | 105 |
96 // Creates a new instance of this class which may be passed to another thread. | 106 // Creates a new instance of this class which may be passed to another thread. |
97 // The returned object may be passed multiple times until Connect() is called, | 107 // The returned object may be passed multiple times until Connect() is called, |
98 // at which point this method must be called again to pass again. | 108 // at which point this method must be called again to pass again. |
99 virtual std::unique_ptr<Connector> Clone() = 0; | 109 virtual std::unique_ptr<Connector> Clone() = 0; |
100 }; | 110 }; |
101 | 111 |
102 } // namespace shell | 112 } // namespace shell |
103 | 113 |
104 #endif // SERVICES_SHELL_PUBLIC_CPP_CONNECTOR_H_ | 114 #endif // SERVICES_SHELL_PUBLIC_CPP_CONNECTOR_H_ |
OLD | NEW |