Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(158)

Unified Diff: services/shell/public/cpp/lib/connection_impl.h

Issue 2090773003: Add ability to bind a different InterfaceRegistry/InterfaceProvider to an incoming Connection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « services/shell/public/cpp/interface_provider.h ('k') | services/shell/public/cpp/lib/connection_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/shell/public/cpp/lib/connection_impl.h
diff --git a/services/shell/public/cpp/lib/connection_impl.h b/services/shell/public/cpp/lib/connection_impl.h
index 95a7b8432d84faa6fb1c741b2052969487cd7f41..faed0911c3d78d7db7070337a5d888e7ef3052b0 100644
--- a/services/shell/public/cpp/lib/connection_impl.h
+++ b/services/shell/public/cpp/lib/connection_impl.h
@@ -33,12 +33,25 @@ class ConnectionImpl : public Connection {
ConnectionImpl(const std::string& connection_name,
const Identity& remote,
uint32_t remote_id,
- shell::mojom::InterfaceProviderPtr remote_interfaces,
- shell::mojom::InterfaceProviderRequest local_interfaces,
const CapabilityRequest& capability_request,
State initial_state);
~ConnectionImpl() override;
+ // Sets the local registry & remote provider, transferring ownership to the
+ // ConnectionImpl.
+ void SetExposedInterfaces(
+ std::unique_ptr<InterfaceRegistry> exposed_interfaces);
+ void SetRemoteInterfaces(
+ std::unique_ptr<InterfaceProvider> remote_interfaces);
+
+ // Sets the local registry & remote provider, without transferring ownership.
+ void set_exposed_interfaces(InterfaceRegistry* exposed_interfaces) {
+ exposed_interfaces_ = exposed_interfaces;
+ }
+ void set_remote_interfaces(InterfaceProvider* remote_interfaces) {
+ remote_interfaces_ = remote_interfaces;
+ }
+
shell::mojom::Connector::ConnectCallback GetConnectCallback();
private:
@@ -69,8 +82,11 @@ class ConnectionImpl : public Connection {
shell::mojom::ConnectResult result_ = shell::mojom::ConnectResult::SUCCEEDED;
std::vector<base::Closure> connection_completed_callbacks_;
- InterfaceRegistry interfaces_;
- InterfaceProvider remote_interfaces_;
+ InterfaceRegistry* exposed_interfaces_ = nullptr;
+ InterfaceProvider* remote_interfaces_ = nullptr;
+
+ std::unique_ptr<InterfaceRegistry> exposed_interfaces_owner_;
+ std::unique_ptr<InterfaceProvider> remote_interfaces_owner_;
const CapabilityRequest capability_request_;
const bool allow_all_interfaces_;
« no previous file with comments | « services/shell/public/cpp/interface_provider.h ('k') | services/shell/public/cpp/lib/connection_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698