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

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

Issue 2075003002: Separate Remote InterfaceProvider again, and add a new client lib type for it. (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
Index: services/shell/public/cpp/lib/remote_interface_registry.cc
diff --git a/services/shell/public/cpp/lib/remote_interface_registry.cc b/services/shell/public/cpp/lib/remote_interface_registry.cc
new file mode 100644
index 0000000000000000000000000000000000000000..5915e1824b84f1977b3506af68d2233f60f6a705
--- /dev/null
+++ b/services/shell/public/cpp/lib/remote_interface_registry.cc
@@ -0,0 +1,33 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "services/shell/public/cpp/remote_interface_registry.h"
+
+namespace shell {
+
+RemoteInterfaceRegistry::RemoteInterfaceRegistry(
+ mojom::InterfaceProviderPtr remote_interfaces)
+ : remote_interfaces_(std::move(remote_interfaces)) {}
+RemoteInterfaceRegistry::~RemoteInterfaceRegistry() {}
+
+mojom::InterfaceProvider* RemoteInterfaceRegistry::GetInterfaceProvider() {
+ return remote_interfaces_.get();
+}
+
+void RemoteInterfaceRegistry::SetConnectionLostClosure(
+ const base::Closure& connection_lost_closure) {
+ remote_interfaces_.set_connection_error_handler(connection_lost_closure);
+}
+
+void RemoteInterfaceRegistry::GetInterface(
+ const std::string& name,
+ mojo::ScopedMessagePipeHandle request_handle) {
+ remote_interfaces_->GetInterface(name, std::move(request_handle));
+}
+
+void RemoteInterfaceRegistry::ClearBinders() {
+ binders_.clear();
+}
+
+} // namespace shell
« no previous file with comments | « services/shell/public/cpp/lib/interface_registry.cc ('k') | services/shell/public/cpp/remote_interface_registry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698