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

Unified Diff: services/shell/public/cpp/lib/interface_provider.cc

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/lib/connector_impl.cc ('k') | services/shell/public/cpp/lib/shell_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/shell/public/cpp/lib/interface_provider.cc
diff --git a/services/shell/public/cpp/lib/interface_provider.cc b/services/shell/public/cpp/lib/interface_provider.cc
index 6636444312992bb9b918ca02b81582c7edec688c..268c49a46bcf3b03752294258f6a232649f45683 100644
--- a/services/shell/public/cpp/lib/interface_provider.cc
+++ b/services/shell/public/cpp/lib/interface_provider.cc
@@ -6,12 +6,14 @@
namespace shell {
-InterfaceProvider::InterfaceProvider(
- mojom::InterfaceProviderPtr interface_provider)
- : interface_provider_(std::move(interface_provider)),
- weak_factory_(this) {}
+InterfaceProvider::InterfaceProvider() : weak_factory_(this) {}
InterfaceProvider::~InterfaceProvider() {}
+void InterfaceProvider::Bind(mojom::InterfaceProviderPtr interface_provider) {
+ DCHECK(!interface_provider_.is_bound());
+ interface_provider_ = std::move(interface_provider);
+}
+
void InterfaceProvider::SetConnectionLostClosure(
const base::Closure& connection_lost_closure) {
interface_provider_.set_connection_error_handler(connection_lost_closure);
« no previous file with comments | « services/shell/public/cpp/lib/connector_impl.cc ('k') | services/shell/public/cpp/lib/shell_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698